IGNITE-10809 Fix IgniteClusterActivateDeactivateTestWithPersistence.testActivateFailover3
authorSergey Chugunov <sergey.chugunov@gmail.com>
Tue, 25 Dec 2018 11:01:50 +0000 (14:01 +0300)
committerDmitriy Govorukhin <dmitriy.govorukhin@gmail.com>
Fri, 11 Jan 2019 14:01:57 +0000 (17:01 +0300)
Signed-off-by: Dmitriy Govorukhin <dmitriy.govorukhin@gmail.com>
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTest.java
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistence.java

index 21290b9..df0ac1a 100644 (file)
@@ -1266,6 +1266,13 @@ public class IgniteClusterActivateDeactivateTest extends GridCommonAbstractTest
 
         ignite(4).cluster().active(true);
 
+        doFinalChecks();
+    }
+
+    /**
+     * Verifies correctness of cache operations when working in in-memory mode.
+     */
+    protected void doFinalChecks() throws Exception {
         for (int i = 0; i < 4; i++)
             startGrid(i);
 
index 70d0034..8aa5ade 100644 (file)
@@ -40,6 +40,7 @@ import org.apache.ignite.internal.util.GridConcurrentHashSet;
 import org.apache.ignite.internal.util.typedef.G;
 import org.apache.ignite.internal.util.typedef.X;
 import org.apache.ignite.internal.util.typedef.internal.CU;
+import org.apache.ignite.spi.IgniteSpiException;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.MvccFeatureChecker;
 import org.junit.Assert;
@@ -47,6 +48,8 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
 
+import static org.apache.ignite.testframework.GridTestUtils.assertThrowsAnyCause;
+
 /**
  *
  */
@@ -248,6 +251,21 @@ public class IgniteClusterActivateDeactivateTestWithPersistence extends IgniteCl
     }
 
     /**
+     * Verifies correctness of BaselineTopology checks when working in persistent mode.
+     */
+    @Override protected void doFinalChecks() {
+        for (int i = 0; i < 4; i++) {
+            int j = i;
+
+            assertThrowsAnyCause(log, () -> {
+                startGrid(j);
+
+                return null;
+            }, IgniteSpiException.class, "not compatible");
+        }
+    }
+
+    /**
      * @see <a href="https://issues.apache.org/jira/browse/IGNITE-7330">IGNITE-7330</a> for more information about context of the test
      */
     @Test