ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # ignite-901
Date Thu, 16 Jul 2015 06:58:23 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-901 6133882e1 -> 3518ba859


# ignite-901


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

Branch: refs/heads/ignite-901
Commit: 3518ba8598655f708b9c85077aa702d85a38da42
Parents: 6133882
Author: sboikov <sboikov@gridgain.com>
Authored: Thu Jul 16 09:58:16 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu Jul 16 09:58:16 2015 +0300

----------------------------------------------------------------------
 .../internal/managers/discovery/GridDiscoveryManager.java   | 6 +++---
 .../ignite/internal/IgniteClientReconnectAbstractTest.java  | 8 ++++++--
 .../processors/cache/IgniteClientReconnectQueriesTest.java  | 9 ++++-----
 3 files changed, 13 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3518ba85/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index f3c7589..068d374 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -188,14 +188,14 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi>
{
     /** Received custom messages history. */
     private final ArrayDeque<IgniteUuid> rcvdCustomMsgs = new ArrayDeque<>();
 
+    /** */
+    private final CountDownLatch startLatch = new CountDownLatch(1);
+
     /** @param ctx Context. */
     public GridDiscoveryManager(GridKernalContext ctx) {
         super(ctx, ctx.config().getDiscoverySpi());
     }
 
-    /** */
-    private final CountDownLatch startLatch = new CountDownLatch(1);
-
     /**
      * @return Memory usage of non-heap memory.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3518ba85/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectAbstractTest.java
index 32dc3d3..fbaea11 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectAbstractTest.java
@@ -201,7 +201,7 @@ public abstract class IgniteClientReconnectAbstractTest extends GridCommonAbstra
 
         clientSpi.writeLatch = new CountDownLatch(1);
 
-        client.events().localListen(new IgnitePredicate<Event>() {
+        IgnitePredicate<Event> p = new IgnitePredicate<Event>() {
             @Override public boolean apply(Event evt) {
                 if (evt.type() == EVT_CLIENT_NODE_DISCONNECTED) {
                     info("Disconnected: " + evt);
@@ -216,7 +216,9 @@ public abstract class IgniteClientReconnectAbstractTest extends GridCommonAbstra
 
                 return true;
             }
-        }, EVT_CLIENT_NODE_DISCONNECTED, EVT_CLIENT_NODE_RECONNECTED);
+        };
+
+        client.events().localListen(p, EVT_CLIENT_NODE_DISCONNECTED, EVT_CLIENT_NODE_RECONNECTED);
 
         srvSpi.failNode(client.cluster().localNode().id(), null);
 
@@ -230,6 +232,8 @@ public abstract class IgniteClientReconnectAbstractTest extends GridCommonAbstra
         clientSpi.writeLatch.countDown();
 
         waitReconnectEvent(reconnectLatch);
+
+        client.events().stopLocalListen(p);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3518ba85/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectQueriesTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectQueriesTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectQueriesTest.java
index bca7f3c..547adcb 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectQueriesTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectQueriesTest.java
@@ -192,7 +192,7 @@ public class IgniteClientReconnectQueriesTest extends IgniteClientReconnectAbstr
 
         final IgniteCache<Integer, Person> srvCache = srv.getOrCreateCache(QUERY_CACHE);
 
-        for (int i = 0; i < 100; i++)
+        for (int i = 0; i < 10_000; i++)
             clnCache.put(i, new Person(i, "name-" + i, "surname-" + i));
 
         final ScanQuery<Integer, Person> scanQry = new ScanQuery<>();
@@ -209,14 +209,13 @@ public class IgniteClientReconnectQueriesTest extends IgniteClientReconnectAbstr
 
         reconnectClientNode(cln, srv, new Runnable() {
             @Override public void run() {
-                srvCache.put(1000, new Person(1000, "name", "surname"));
+                srvCache.put(10_001, new Person(10_001, "name", "surname"));
 
                 try {
                     clnCache.query(scanQry);
 
                     fail();
-                }
-                catch (CacheException e) {
+                } catch (CacheException e) {
                     check(e);
                 }
             }
@@ -233,7 +232,7 @@ public class IgniteClientReconnectQueriesTest extends IgniteClientReconnectAbstr
 
         qryCursor = clnCache.query(scanQry);
 
-        assertEquals(101, qryCursor.getAll().size());
+        assertEquals(10_001, qryCursor.getAll().size());
     }
 
     /**


Mime
View raw message