ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [42/50] [abbrv] incubator-ignite git commit: ignite-890: fixing
Date Tue, 14 Jul 2015 13:20:15 GMT
ignite-890: fixing


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

Branch: refs/heads/ignite-890
Commit: e25d5b11cb08ba7fcb0a64721603de3f8c50aa28
Parents: dce50db
Author: Denis Magda <dmagda@gridgain.com>
Authored: Mon Jul 13 14:01:46 2015 +0300
Committer: Denis Magda <dmagda@gridgain.com>
Committed: Mon Jul 13 14:01:46 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/spi/discovery/tcp/ServerImpl.java   |  4 ++++
 .../spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java  |  8 ++++----
 .../ignite/testframework/junits/GridAbstractTest.java     | 10 ++++++++--
 3 files changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e25d5b11/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 ff33efa..33abe55 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
@@ -1710,6 +1710,8 @@ class ServerImpl extends TcpDiscoveryImpl {
 
                     if (res != null && msg.verified())
                         res.add(prepare(msg, node.id()));
+                    else
+                        log.info("(1) Skipping message with [topVer=" + msg.topologyVersion()
+ ", msg=" + msg + ']');
                 }
 
                 if (log.isDebugEnabled()) {
@@ -1736,6 +1738,8 @@ class ServerImpl extends TcpDiscoveryImpl {
                     }
                     else if (msg.verified())
                         cp.add(prepare(msg, node.id()));
+                    else
+                        log.info("(2) Skipping message with [topVer=" + msg.topologyVersion()
+ ", msg=" + msg + ']');
                 }
 
                 cp = !skip ? cp : null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e25d5b11/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java
b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java
index b291b9c..cd07341 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMultiThreadedTest.java
@@ -37,10 +37,10 @@ import static org.apache.ignite.events.EventType.*;
  */
 public class TcpDiscoveryMultiThreadedTest extends GridCommonAbstractTest {
     /** */
-    private static final int GRID_CNT = 3;
+    private static final int GRID_CNT = 4;
 
     /** */
-    private static final int CLIENT_GRID_CNT = 2;
+    private static final int CLIENT_GRID_CNT = 1;
 
     /** */
     private static final ThreadLocal<Boolean> clientFlagPerThread = new ThreadLocal<>();
@@ -185,7 +185,7 @@ public class TcpDiscoveryMultiThreadedTest extends GridCommonAbstractTest
{
                     int idx = clientIdx.getAndIncrement();
 
                     while (!done.get()) {
-                        stopGrid(idx);
+                        assertTrue(stopGrid(idx, true));
                         startGrid(idx);
                     }
 
@@ -208,7 +208,7 @@ public class TcpDiscoveryMultiThreadedTest extends GridCommonAbstractTest
{
                     while (!done.get()) {
                         int idx = srvIdx.take();
 
-                        stopGrid(idx);
+                        assertTrue(stopGrid(idx, true));
                         startGrid(idx);
 
                         srvIdx.add(idx);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e25d5b11/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
index 06a1523..29d204e 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
@@ -1022,9 +1022,11 @@ public abstract class GridAbstractTest extends TestCase {
      * @param cancel Cancel flag.
      */
     @SuppressWarnings("deprecation")
-    protected void stopGrid(int idx, boolean cancel) {
+    protected boolean stopGrid(int idx, boolean cancel) {
         String gridName = getTestGridName(idx);
 
+        boolean res;
+
         try {
             Ignite ignite = G.ignite(gridName);
 
@@ -1032,16 +1034,20 @@ public abstract class GridAbstractTest extends TestCase {
 
             info(">>> Stopping grid [name=" + ignite.name() + ", id=" + ignite.cluster().localNode().id()
+ ']');
 
-            G.stop(gridName, cancel);
+            res = G.stop(gridName, cancel);
         }
         catch (IllegalStateException ignored) {
             // Ignore error if grid already stopped.
+            res = true;
         }
         catch (Throwable e) {
             error("Failed to stop grid [gridName=" + gridName + ", cancel=" + cancel + ']',
e);
 
             stopGridErr = true;
+            res = false;
         }
+
+        return res;
     }
 
     /**


Mime
View raw message