You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2016/01/22 10:07:49 UTC

ignite git commit: Minor test change.

Repository: ignite
Updated Branches:
  refs/heads/master 74f698478 -> 243a8575a


Minor test change.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/243a8575
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/243a8575
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/243a8575

Branch: refs/heads/master
Commit: 243a8575a77bd8986e7bc995e71d4a73a4d37010
Parents: 74f6984
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jan 22 12:07:39 2016 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jan 22 12:07:39 2016 +0300

----------------------------------------------------------------------
 .../tcp/ipfinder/zk/ZookeeperIpFinderTest.java       | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/243a8575/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java
----------------------------------------------------------------------
diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java
index e53f335..cadd3a7 100644
--- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java
+++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java
@@ -116,9 +116,8 @@ public class ZookeeperIpFinderTest extends GridCommonAbstractTest {
 
         // first node => configure with zkUrl; second node => configure with CuratorFramework; third and subsequent
         // shall be configured through system property
-        if (gridName.equals(getTestGridName(0))) {
+        if (gridName.equals(getTestGridName(0)))
             zkIpFinder.setZkConnectionString(zkCluster.getConnectString());
-        }
         else if (gridName.equals(getTestGridName(1))) {
             zkIpFinder.setCurator(CuratorFrameworkFactory.newClient(zkCluster.getConnectString(),
                 new ExponentialBackoffRetry(100, 5)));
@@ -357,7 +356,7 @@ public class ZookeeperIpFinderTest extends GridCommonAbstractTest {
         // stop all grids
         stopAllGrids();
 
-        GridTestUtils.waitForCondition(new GridAbsPredicate() {
+        boolean wait = GridTestUtils.waitForCondition(new GridAbsPredicate() {
             @Override public boolean apply() {
                 try {
                     return zkCurator.getChildren().forPath(SERVICES_IGNITE_ZK_PATH).size() == 0;
@@ -370,20 +369,22 @@ public class ZookeeperIpFinderTest extends GridCommonAbstractTest {
             }
         }, 5000);
 
+        assertTrue(wait);
+
         // check that all nodes are gone in ZK
         assertEquals(0, zkCurator.getChildren().forPath(SERVICES_IGNITE_ZK_PATH).size());
     }
 
     /**
      * @param ignite Node.
-     * @param joinEventCount Expected events number.
+     * @param joinEvtCnt Expected events number.
      * @return Events latch.
      */
-    private CountDownLatch expectJoinEvents(Ignite ignite, int joinEventCount) {
-        final CountDownLatch latch = new CountDownLatch(joinEventCount);
+    private CountDownLatch expectJoinEvents(Ignite ignite, int joinEvtCnt) {
+        final CountDownLatch latch = new CountDownLatch(joinEvtCnt);
 
         ignite.events().remoteListen(new IgniteBiPredicate<UUID, Event>() {
-            @Override public boolean apply(UUID uuid, Event event) {
+            @Override public boolean apply(UUID uuid, Event evt) {
                 latch.countDown();
                 return true;
             }