ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [07/50] ignite git commit: Fixed test (ignite-795).
Date Wed, 09 Sep 2015 12:37:19 GMT
Fixed test (ignite-795).


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

Branch: refs/heads/ignite-843
Commit: a96849d1c28a40e339d8909bd916a05ee0f26d52
Parents: d8cd7ba
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Sep 8 12:42:27 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Sep 8 12:42:27 2015 +0300

----------------------------------------------------------------------
 .../IgniteCacheMessageRecoveryAbstractTest.java       | 14 +++++++++++---
 .../distributed/IgniteCacheTxMessageRecoveryTest.java |  5 -----
 2 files changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a96849d1/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java
index 63be871..16d7e5d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheMessageRecoveryAbstractTest.java
@@ -145,11 +145,15 @@ public abstract class IgniteCacheMessageRecoveryAbstractTest extends
GridCommonA
         });
 
         try {
+            boolean closed = false;
+
             for (int i = 0; i < 30; i++) {
                 Thread.sleep(1000);
 
-                closeSessions();
+                closed |= closeSessions();
             }
+
+            assertTrue(closed);
         }
         finally {
             stop.set(true);
@@ -161,7 +165,7 @@ public abstract class IgniteCacheMessageRecoveryAbstractTest extends GridCommonA
     /**
      * @throws Exception If failed.
      */
-    private void closeSessions() throws Exception {
+    private boolean closeSessions() throws Exception {
         Ignite ignite = ignite(ThreadLocalRandom.current().nextInt(0, GRID_CNT));
 
         log.info("Close sessions for: " + ignite.name());
@@ -170,7 +174,7 @@ public abstract class IgniteCacheMessageRecoveryAbstractTest extends GridCommonA
 
         Map<UUID, GridCommunicationClient> clients = U.field(commSpi, "clients");
 
-        assertTrue(clients.size() > 0);
+        boolean closed = false;
 
         for (GridCommunicationClient client : clients.values()) {
             GridTcpNioCommunicationClient client0 = (GridTcpNioCommunicationClient)client;
@@ -178,6 +182,10 @@ public abstract class IgniteCacheMessageRecoveryAbstractTest extends
GridCommonA
             GridNioSession ses = client0.session();
 
             ses.close();
+
+            closed = true;
         }
+
+        return closed;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/a96849d1/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxMessageRecoveryTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxMessageRecoveryTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxMessageRecoveryTest.java
index cad8607..65adfdd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxMessageRecoveryTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxMessageRecoveryTest.java
@@ -26,11 +26,6 @@ import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
  */
 public class IgniteCacheTxMessageRecoveryTest extends IgniteCacheMessageRecoveryAbstractTest
{
     /** {@inheritDoc} */
-    @Override protected void beforeTest() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-795");
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode atomicityMode() {
         return TRANSACTIONAL;
     }


Mime
View raw message