IGNITE Cancel user's request when grid stopping.

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

Branch: refs/heads/sprint-1
Commit: efd0902764f6ddfafd53a5612ffff74cf9875b33
Parents: d5182f5
Author: nikolay_tikhonov <ntikho...@gridgain.com>
Authored: Sat Feb 14 17:44:23 2015 +0300
Committer: nikolay_tikhonov <ntikho...@gridgain.com>
Committed: Sat Feb 14 17:44:23 2015 +0300

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


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/efd09027/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 ea9c859..844dcb9 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,6 +60,9 @@ public abstract class IgniteCacheAbstractStopBusySelfTest 
extends GridCommonAbst
     private AtomicBoolean suspended = new AtomicBoolean(false);
 
     /** */
+    private AtomicBoolean blocked = new AtomicBoolean(false);
+
+    /** */
     protected AtomicReference<Class> bannedMessage = new AtomicReference<>();
 
     /**
@@ -239,6 +242,10 @@ public abstract class IgniteCacheAbstractStopBusySelfTest 
extends GridCommonAbst
 
         Thread stopThread = new Thread(new StopRunnable());
 
+        while (!blocked.get());
+
+        blocked.set(false);
+
         stopThread.start();
 
         stopThread.join(10000L);
@@ -347,8 +354,11 @@ public abstract class IgniteCacheAbstractStopBusySelfTest 
extends GridCommonAbst
                 assert bannedMessage.get() != null;
 
                 if (msg instanceof GridIoMessage
-                    && 
((GridIoMessage)msg).message().getClass().equals(bannedMessage.get()))
+                    && 
((GridIoMessage)msg).message().getClass().equals(bannedMessage.get())) {
+                    blocked.set(true);
+
                     return;
+                }
             }
 
             super.sendMessage(node, msg);

Reply via email to