IGNITE Fixed review notes.

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

Branch: refs/heads/sprint-1
Commit: 5fac852c40261cb76dae48d1e6c2b214a3e01f30
Parents: efd0902
Author: nikolay_tikhonov <ntikho...@gridgain.com>
Authored: Sat Feb 14 17:53:39 2015 +0300
Committer: nikolay_tikhonov <ntikho...@gridgain.com>
Committed: Sat Feb 14 17:53:39 2015 +0300

----------------------------------------------------------------------
 .../cache/IgniteCacheAbstractStopBusySelfTest.java      | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5fac852c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
index 844dcb9..4e795e4 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractStopBusySelfTest.java
@@ -60,7 +60,7 @@ public abstract class IgniteCacheAbstractStopBusySelfTest 
extends GridCommonAbst
     private AtomicBoolean suspended = new AtomicBoolean(false);
 
     /** */
-    private AtomicBoolean blocked = new AtomicBoolean(false);
+    private CountDownLatch blocked;
 
     /** */
     protected AtomicReference<Class> bannedMessage = new AtomicReference<>();
@@ -128,6 +128,8 @@ public abstract class IgniteCacheAbstractStopBusySelfTest 
extends GridCommonAbst
 
         startGrid(CLN_GRD);
 
+        blocked = new CountDownLatch(1);
+
         for (int i = 0; i < 10; ++i) {
             if (clientNode().cluster().nodes().size() == 2)
                 break;
@@ -242,9 +244,7 @@ public abstract class IgniteCacheAbstractStopBusySelfTest 
extends GridCommonAbst
 
         Thread stopThread = new Thread(new StopRunnable());
 
-        while (!blocked.get());
-
-        blocked.set(false);
+        blocked.await();
 
         stopThread.start();
 
@@ -291,7 +291,7 @@ public abstract class IgniteCacheAbstractStopBusySelfTest 
extends GridCommonAbst
 
         Thread stopThread = new Thread(new StopRunnable());
 
-        U.sleep(100);
+        blocked.await();
 
         stopThread.start();
 
@@ -355,7 +355,7 @@ public abstract class IgniteCacheAbstractStopBusySelfTest 
extends GridCommonAbst
 
                 if (msg instanceof GridIoMessage
                     && 
((GridIoMessage)msg).message().getClass().equals(bannedMessage.get())) {
-                    blocked.set(true);
+                    blocked.countDown();
 
                     return;
                 }

Reply via email to