IGNITE-10813 Changed test runner to JUnit4. - Fixes #5743.
authorAndrey Kuznetsov <stkuzma@gmail.com>
Wed, 26 Dec 2018 15:57:27 +0000 (18:57 +0300)
committerDmitriy Pavlov <dpavlov@apache.org>
Wed, 26 Dec 2018 15:57:27 +0000 (18:57 +0300)
Signed-off-by: Dmitriy Pavlov <dpavlov@apache.org>
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/CheckpointReadLockFailureTest.java

index b3fede0..ff9c60d 100644 (file)
@@ -32,11 +32,17 @@ import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
 
 /**
  * Tests critical failure handling on checkpoint read lock acquisition errors.
  */
+@RunWith(JUnit4.class)
 public class CheckpointReadLockFailureTest extends GridCommonAbstractTest {
     /** */
     private static final AbstractFailureHandler FAILURE_HND = new AbstractFailureHandler() {
@@ -65,21 +71,30 @@ public class CheckpointReadLockFailureTest extends GridCommonAbstractTest {
                 .setCheckpointReadLockTimeout(1));
     }
 
-    /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
+    /**
+     *
+     */
+    @BeforeClass
+    public static void beforeClass() {
         Set<FailureType> ignoredFailureTypes = new HashSet<>(FAILURE_HND.getIgnoredFailureTypes());
         ignoredFailureTypes.remove(FailureType.SYSTEM_CRITICAL_OPERATION_TIMEOUT);
 
         FAILURE_HND.setIgnoredFailureTypes(ignoredFailureTypes);
     }
 
-    /** {@inheritDoc} */
-    @Override protected void beforeTest() throws Exception {
+    /**
+     *
+     */
+    @Before
+    public void before() throws Exception {
         cleanPersistenceDir();
     }
 
-    /** {@inheritDoc} */
-    @Override protected void afterTest() throws Exception {
+    /**
+     *
+     */
+    @After
+    public void after() throws Exception {
         cleanPersistenceDir();
     }