Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ED1F41827C for ; Tue, 11 Aug 2015 06:05:55 +0000 (UTC) Received: (qmail 10750 invoked by uid 500); 11 Aug 2015 06:05:55 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 10717 invoked by uid 500); 11 Aug 2015 06:05:55 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 10699 invoked by uid 99); 11 Aug 2015 06:05:55 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Aug 2015 06:05:55 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 45896DB75D; Tue, 11 Aug 2015 06:05:53 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3017192466185999134==" MIME-Version: 1.0 Subject: Review Request 37343: Deleting of one instance deletes all instances of view From: "DIPAYAN BHOWMICK" To: "Mahadev Konar" , "Sid Wagle" , "Yusaku Sako" Cc: "DIPAYAN BHOWMICK" , "Ambari" Date: Tue, 11 Aug 2015 06:05:53 -0000 Message-ID: <20150811060553.1374.52438@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "DIPAYAN BHOWMICK" X-ReviewGroup: Ambari X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/37343/ X-Sender: "DIPAYAN BHOWMICK" Reply-To: "DIPAYAN BHOWMICK" X-ReviewRequest-Repository: ambari --===============3017192466185999134== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- 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 --===============3017192466185999134==--