Skip to content

Commit

Permalink
IGNITE Fixed review notes.
Browse files Browse the repository at this point in the history
  • Loading branch information
niktikhonov committed Feb 14, 2015
1 parent efd0902 commit 5fac852
Showing 1 changed file with 6 additions and 6 deletions.
Expand Up @@ -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<>();
Expand Down Expand Up @@ -128,6 +128,8 @@ protected CacheAtomicityMode atomicityMode(){

startGrid(CLN_GRD);

blocked = new CountDownLatch(1);

for (int i = 0; i < 10; ++i) {
if (clientNode().cluster().nodes().size() == 2)
break;
Expand Down Expand Up @@ -242,9 +244,7 @@ private <T> void executeTest(Callable<T> call) throws Exception {

Thread stopThread = new Thread(new StopRunnable());

while (!blocked.get());

blocked.set(false);
blocked.await();

stopThread.start();

Expand Down Expand Up @@ -291,7 +291,7 @@ public void testPutBatch() throws Exception {

Thread stopThread = new Thread(new StopRunnable());

U.sleep(100);
blocked.await();

stopThread.start();

Expand Down Expand Up @@ -355,7 +355,7 @@ private class TestTpcCommunicationSpi extends TcpCommunicationSpi {

if (msg instanceof GridIoMessage
&& ((GridIoMessage)msg).message().getClass().equals(bannedMessage.get())) {
blocked.set(true);
blocked.countDown();

return;
}
Expand Down

0 comments on commit 5fac852

Please sign in to comment.