ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DIPAYAN BHOWMICK" <dipayan.bhowm...@gmail.com>
Subject Review Request 37343: Deleting of one instance deletes all instances of view
Date Tue, 11 Aug 2015 06:05:53 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37343/
-----------------------------------------------------------

Review request for Ambari, Mahadev Konar, Sid Wagle, and Yusaku Sako.


Bugs: https://issues.apache.org/jira/browse/AMBARI-12709
    https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/AMBARI-12709


Repository: ambari


Description
-------

There was an issue with ComparisonPredicte#stringToDouble method. Though the method was supposed
to be side-affect free, but the code was always returning the double value of the 'value'
instance variable for whatever 'stringValue' was passed to it. So 'evaluate' method was returning
true for the EqualsPredicate class for instanceId 2 thought the actual instance requested
for deletion was 1.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/predicate/ComparisonPredicate.java
c1cd16c 
  ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/EqualsPredicateTest.java
5299c93 

Diff: https://reviews.apache.org/r/37343/diff/


Testing
-------

Added a test to verify this.

Result:
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Picked up _JAVA_OPTIONS: -Xmx2048m -XX:MaxPermSize=512m -Djava.awt.headless=true
Running org.apache.ambari.server.controller.predicate.EqualsPredicateTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.58 sec

Results :

Tests run: 4, Failures: 0, Errors: 0, Skipped: 0


Thanks,

DIPAYAN BHOWMICK


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message