ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [3/4] incubator-ignite git commit: IGNITE Fixed review notes.
Date Sat, 14 Feb 2015 14:55:50 GMT
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 <ntikhonov@gridgain.com>
Authored: Sat Feb 14 17:53:39 2015 +0300
Committer: nikolay_tikhonov <ntikhonov@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;
                 }


Mime
View raw message