ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-1758 debug
Date Mon, 02 Nov 2015 09:40:03 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1758 12fc32344 -> 98de9d49a


ignite-1758 debug


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

Branch: refs/heads/ignite-1758
Commit: 98de9d49aabbc57370e2b5d1846a1460b74a3ea5
Parents: 12fc323
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Nov 2 12:39:56 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Nov 2 12:39:56 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/spi/discovery/tcp/ServerImpl.java   |  2 +-
 .../tcp/IgniteClientReconnectMassiveShutdownTest.java     | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/98de9d49/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index c39caba..d5de093 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -1778,7 +1778,7 @@ class ServerImpl extends TcpDiscoveryImpl {
                     Collection<TcpDiscoveryNode> top = new ArrayList<>(allNodes.size());
 
                     for (TcpDiscoveryNode n0 : allNodes) {
-                        assert n0.internalOrder() > 0;
+                        assert n0.internalOrder() > 0 : n0;
 
                         if (n0.internalOrder() < node.internalOrder())
                             top.add(n0);

http://git-wip-us.apache.org/repos/asf/ignite/blob/98de9d49/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java
b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java
index e31f765..b31fd49 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java
@@ -22,6 +22,7 @@ import java.util.Random;
 import java.util.UUID;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.Callable;
+import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.atomic.AtomicBoolean;
 import javax.cache.CacheException;
@@ -41,6 +42,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.transactions.Transaction;
 
+import static java.util.concurrent.TimeUnit.SECONDS;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
@@ -141,6 +143,8 @@ public class IgniteClientReconnectMassiveShutdownTest extends GridCommonAbstract
 
         IgniteCache<String, Integer> cache = client.getOrCreateCache(cfg);
 
+        assertNotNull(cache);
+
         HashMap<String, Integer> put = new HashMap<>();
 
         // Load some data.
@@ -155,6 +159,8 @@ public class IgniteClientReconnectMassiveShutdownTest extends GridCommonAbstract
         for (int i = GRID_CNT; i < GRID_CNT + CLIENT_GRID_CNT; i++)
             clientIdx.add(i);
 
+        final CountDownLatch latch = new CountDownLatch(CLIENT_GRID_CNT);
+
         IgniteInternalFuture<?> clientsFut = multithreadedAsync(
             new Callable<Object>() {
                 @Override public Object call() throws Exception {
@@ -174,6 +180,8 @@ public class IgniteClientReconnectMassiveShutdownTest extends GridCommonAbstract
 
                     Random rand = new Random();
 
+                    latch.countDown();
+
                     while (!done.get()) {
                         try (Transaction tx = txs.txStart(PESSIMISTIC, REPEATABLE_READ))
{
                             cache.put(String.valueOf(rand.nextInt(10_000)), rand.nextInt(50_000));
@@ -209,6 +217,8 @@ public class IgniteClientReconnectMassiveShutdownTest extends GridCommonAbstract
             },
             CLIENT_GRID_CNT, "client-thread");
 
+        assertTrue(latch.await(10, SECONDS));
+
         try {
             // Killing a half of server nodes.
             final int srvsToKill = GRID_CNT / 2;


Mime
View raw message