http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java index fb29745..e0a8cd8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java @@ -32,11 +32,15 @@ import java.util.Iterator; import java.util.Map; import java.util.concurrent.Callable; import java.util.concurrent.CyclicBarrier; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for IGFS working in mode when remote file system exists: DUAL_SYNC, DUAL_ASYNC. */ @SuppressWarnings("ConstantConditions") +@RunWith(JUnit4.class) public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { /** * Constructor. @@ -52,6 +56,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testExistsPathMissing() throws Exception { create(igfsSecondary, paths(DIR), null); @@ -63,6 +68,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testListFilesPathMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR), paths(FILE)); @@ -85,6 +91,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testInfoPathMissing() throws Exception { create(igfsSecondary, paths(DIR), null); create(igfs, null, null); @@ -101,6 +108,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testRenameFileSourceMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), paths(FILE)); create(igfs, paths(DIR), null); @@ -117,6 +125,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testRenameFileSourceMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), paths(FILE)); create(igfs, null, null); @@ -133,6 +142,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testRenameFileParentRootSourceMissing() throws Exception { IgfsPath file1 = new IgfsPath("/file1"); IgfsPath file2 = new IgfsPath("/file2"); @@ -151,6 +161,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testRenameDirectorySourceMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), null); create(igfs, paths(DIR), null); @@ -166,6 +177,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testRenameDirectorySourceMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), null); create(igfs, null, null); @@ -182,6 +194,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testRenameDirectoryParentRootSourceMissing() throws Exception { IgfsPath dir1 = new IgfsPath("/dir1"); IgfsPath dir2 = new IgfsPath("/dir2"); @@ -200,6 +213,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveFileSourceMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); @@ -216,6 +230,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveFileSourceMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR_NEW, SUBDIR_NEW), paths(FILE)); @@ -232,6 +247,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveFileDestinationMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR, SUBDIR, DIR_NEW), paths(FILE)); @@ -248,6 +264,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveFileDestinationMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR, SUBDIR), paths(FILE)); @@ -264,6 +281,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveFileSourceAndDestinationMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR, DIR_NEW), null); @@ -280,6 +298,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveFileSourceAndDestinationMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, null, null); @@ -296,6 +315,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveFileDestinationRootSourceMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), paths(FILE)); create(igfs, paths(DIR), null); @@ -312,6 +332,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveFileDestinationRootSourceMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), paths(FILE)); create(igfs, null, null); @@ -328,6 +349,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveFileSourceParentRootSourceMissing() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); @@ -345,6 +367,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveFileSourceParentRootDestinationMissingPartially() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); @@ -363,6 +386,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveFileSourceParentRootDestinationMissing() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); @@ -381,6 +405,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileSourceMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); @@ -397,6 +422,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileSourceMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR_NEW, SUBDIR_NEW), paths(FILE)); @@ -413,6 +439,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileDestinationMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR, SUBDIR, DIR_NEW), paths(FILE)); @@ -429,6 +456,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileDestinationMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR, SUBDIR), paths(FILE)); @@ -445,6 +473,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileSourceAndDestinationMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR, DIR_NEW), null); @@ -461,6 +490,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileSourceAndDestinationMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, null, null); @@ -477,6 +507,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileDestinationRootSourceMissingPartially() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); @@ -495,6 +526,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileDestinationRootSourceMissing() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); @@ -513,6 +545,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileSourceParentRootSourceMissing() throws Exception { IgfsPath file = new IgfsPath("/" + FILE_NEW.name()); @@ -530,6 +563,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileSourceParentRootDestinationMissingPartially() throws Exception { IgfsPath file = new IgfsPath("/" + FILE_NEW.name()); @@ -548,6 +582,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileSourceParentRootDestinationMissing() throws Exception { IgfsPath file = new IgfsPath("/" + FILE_NEW.name()); @@ -566,6 +601,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveDirectorySourceMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR, DIR_NEW, SUBDIR_NEW), null); @@ -582,6 +618,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveDirectorySourceMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR_NEW, SUBDIR_NEW), null); @@ -599,6 +636,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveDirectoryDestinationMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW), null); @@ -615,6 +653,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveDirectoryDestinationMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR, SUBDIR, SUBSUBDIR), null); @@ -631,6 +670,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveDirectorySourceAndDestinationMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR, DIR_NEW), null); @@ -647,6 +687,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveDirectorySourceAndDestinationMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, null, null); @@ -663,6 +704,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveDirectoryDestinationRootSourceMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR), null); create(igfs, paths(DIR), null); @@ -679,6 +721,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveDirectoryDestinationRootSourceMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR), null); create(igfs, null, null); @@ -695,6 +738,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveDirectorySourceParentRootSourceMissing() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR.name()); @@ -712,6 +756,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveDirectorySourceParentRootDestinationMissingPartially() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR.name()); @@ -730,6 +775,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveDirectorySourceParentRootDestinationMissing() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR.name()); @@ -748,6 +794,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectorySourceMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR, DIR_NEW, SUBDIR_NEW), null); @@ -764,6 +811,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectorySourceMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR_NEW, SUBDIR_NEW), null); @@ -781,6 +829,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectoryDestinationMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW), null); @@ -797,6 +846,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectoryDestinationMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR, SUBDIR, SUBSUBDIR), null); @@ -813,6 +863,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectorySourceAndDestinationMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, paths(DIR, DIR_NEW), null); @@ -829,6 +880,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectorySourceAndDestinationMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); create(igfs, null, null); @@ -845,6 +897,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectoryDestinationRootSourceMissingPartially() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR.name()); @@ -863,6 +916,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectoryDestinationRootSourceMissing() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR.name()); @@ -881,6 +935,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectorySourceParentRootSourceMissing() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR_NEW.name()); @@ -898,6 +953,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectorySourceParentRootDestinationMissingPartially() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR_NEW.name()); @@ -916,6 +972,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectorySourceParentRootDestinationMissing() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR_NEW.name()); @@ -934,6 +991,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMkdirsParentPathMissingPartially() throws Exception { Map<String, String> props = null; @@ -964,6 +1022,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testMkdrisParentPathMissing() throws Exception { Map<String, String> props = null; @@ -995,6 +1054,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testDeletePathMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR), paths(FILE)); create(igfs, paths(DIR), null); @@ -1010,6 +1070,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testDeletePathMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR), paths(FILE)); create(igfs, null, null); @@ -1025,6 +1086,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testDeleteParentRootPathMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, SUBSUBDIR), paths(FILE)); create(igfs, null, null); @@ -1039,6 +1101,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testUpdatePathMissingPartially() throws Exception { if(!propertiesSupported()) return; @@ -1070,6 +1133,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testUpdatePathMissing() throws Exception { if(!propertiesSupported()) return; @@ -1101,6 +1165,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testUpdateParentRootPathMissing() throws Exception { doUpdateParentRootPathMissing(properties("owner", "group", "0555")); } @@ -1131,6 +1196,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testOpenMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), null); create(igfs, null, null); @@ -1145,6 +1211,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testCreateParentMissingPartially() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), null); create(igfs, paths(DIR), null); @@ -1161,6 +1228,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testSetPropertiesOnPartiallyMissingDirectory() throws Exception { if (!propertiesSupported()) return; @@ -1181,6 +1249,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testCreateParentMissing() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), null); create(igfs, null, null); @@ -1196,6 +1265,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testSetPropertiesOnMissingDirectory() throws Exception { if (!propertiesSupported()) return; @@ -1219,6 +1289,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testAppendParentMissingPartially() throws Exception { if (!appendSupported()) return; @@ -1240,6 +1311,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testAppendParentMissing() throws Exception { if (!appendSupported()) return; @@ -1261,6 +1333,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testConcurrentRenameDeleteSourceRemote() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -1317,6 +1390,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testConcurrentRenameDeleteDestinationRemote() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -1369,6 +1443,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testConcurrentRenamesRemote() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -1429,6 +1504,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testConcurrentDeletesRemote() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -1522,6 +1598,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception On error. */ + @Test public void testAccessAndModificationTimeUpwardsPropagation() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR), paths(FILE, FILE2)); @@ -1548,6 +1625,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testSetTimesMissingPartially() throws Exception { if (!timesSupported()) return; @@ -1585,6 +1663,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { * * @throws Exception If failed. */ + @Test public void testSecondarySize() throws Exception { igfs.mkdirs(SUBDIR); @@ -1610,4 +1689,4 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest { return true; } -} \ No newline at end of file +}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java index 8627ec4..bd5e37d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.lang.IgniteUuid; import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.marshaller.MarshallerContextTestImpl; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * {@link IgfsEntryInfo} test case. */ +@RunWith(JUnit4.class) public class IgfsFileInfoSelfTest extends IgfsCommonAbstractTest { /** Marshaller to test {@link Externalizable} interface. */ private final Marshaller marshaller; @@ -44,6 +48,7 @@ public class IgfsFileInfoSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testSerialization() throws Exception { marshaller.setContext(new MarshallerContextTestImpl()); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileMapSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileMapSelfTest.java index d155cf8..423decb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileMapSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileMapSelfTest.java @@ -24,6 +24,9 @@ import java.util.concurrent.Callable; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.lang.IgniteUuid; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.igfs.IgfsFileAffinityRange.RANGE_STATUS_INITIAL; import static org.apache.ignite.internal.processors.igfs.IgfsFileAffinityRange.RANGE_STATUS_MOVED; @@ -32,10 +35,12 @@ import static org.apache.ignite.internal.processors.igfs.IgfsFileAffinityRange.R /** * File map self test. */ +@RunWith(JUnit4.class) public class IgfsFileMapSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRanges() throws Exception { IgfsFileMap map = new IgfsFileMap(); @@ -69,6 +74,7 @@ public class IgfsFileMapSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAddUpdateAdd() throws Exception { IgfsFileMap map = new IgfsFileMap(); @@ -94,6 +100,7 @@ public class IgfsFileMapSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRangeUpdate1() throws Exception { IgfsFileMap map = new IgfsFileMap(); @@ -141,6 +148,7 @@ public class IgfsFileMapSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRangeUpdate2() throws Exception { IgfsFileMap map = new IgfsFileMap(); @@ -244,6 +252,7 @@ public class IgfsFileMapSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testInvalidRangeUpdates() throws Exception { final IgfsFileMap map = new IgfsFileMap(); @@ -291,6 +300,7 @@ public class IgfsFileMapSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRangeSplit() throws Exception { IgniteUuid affKey = IgniteUuid.randomUuid(); @@ -337,4 +347,4 @@ public class IgfsFileMapSelfTest extends IgfsCommonAbstractTest { assertTrue(part.regionEqual(new IgfsFileAffinityRange(9000, 9999, affKey))); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsGroupDataBlockKeyMapperHashSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsGroupDataBlockKeyMapperHashSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsGroupDataBlockKeyMapperHashSelfTest.java index f8d0a47..7bb0f0b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsGroupDataBlockKeyMapperHashSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsGroupDataBlockKeyMapperHashSelfTest.java @@ -21,14 +21,19 @@ import java.util.concurrent.ThreadLocalRandom; import org.apache.ignite.igfs.IgfsGroupDataBlocksKeyMapper; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteUuid; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link org.apache.ignite.igfs.IgfsGroupDataBlocksKeyMapper} hash. */ +@RunWith(JUnit4.class) public class IgfsGroupDataBlockKeyMapperHashSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDistribution() throws Exception { for (int i = 0; i < 100; i++) { int grpSize = ThreadLocalRandom.current().nextInt(2, 100000); @@ -41,6 +46,7 @@ public class IgfsGroupDataBlockKeyMapperHashSelfTest extends IgfsCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testIntOverflowDistribution() throws Exception { for (int i = 0; i < 100; i++) checkIntOverflowDistribution(ThreadLocalRandom.current().nextInt(1, Integer.MAX_VALUE)); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemDualAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemDualAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemDualAbstractSelfTest.java index ffbcad5..bdfb318 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemDualAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemDualAbstractSelfTest.java @@ -35,10 +35,14 @@ import java.io.OutputStream; import java.nio.file.Files; import java.util.Collection; import java.util.concurrent.atomic.AtomicLong; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Abstract test for Hadoop 1.0 file system stack. */ +@RunWith(JUnit4.class) public abstract class IgfsLocalSecondaryFileSystemDualAbstractSelfTest extends IgfsDualAbstractSelfTest { /** */ private static final String FS_WORK_DIR = U.getIgniteHome() + File.separatorChar + "work" @@ -125,6 +129,7 @@ public abstract class IgfsLocalSecondaryFileSystemDualAbstractSelfTest extends I * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testListPathForSymlink() throws Exception { if (U.isWindows()) return; @@ -147,6 +152,7 @@ public abstract class IgfsLocalSecondaryFileSystemDualAbstractSelfTest extends I * * @throws Exception If failed. */ + @Test public void testDeleteSymlinkDir() throws Exception { if (U.isWindows()) return; @@ -163,6 +169,7 @@ public abstract class IgfsLocalSecondaryFileSystemDualAbstractSelfTest extends I * * @throws Exception If failed. */ + @Test public void testSymlinkToFile() throws Exception { if (U.isWindows()) return; @@ -177,6 +184,7 @@ public abstract class IgfsLocalSecondaryFileSystemDualAbstractSelfTest extends I * * @throws Exception If failed. */ + @Test @Override public void testUpdateParentRootPathMissing() throws Exception { doUpdateParentRootPathMissing(properties(TEST_GROUP, "0555")); } @@ -186,6 +194,7 @@ public abstract class IgfsLocalSecondaryFileSystemDualAbstractSelfTest extends I * * @throws Exception If failed. */ + @Test public void testMkdirsInsideSymlink() throws Exception { if (U.isWindows()) return; @@ -202,6 +211,7 @@ public abstract class IgfsLocalSecondaryFileSystemDualAbstractSelfTest extends I * * @throws Exception If failed. */ + @Test public void testUsedSpaceSize() throws Exception { final int DIRS_COUNT = 5; final int DIRS_MAX_DEEP = 3; @@ -289,4 +299,4 @@ public abstract class IgfsLocalSecondaryFileSystemDualAbstractSelfTest extends I U.closeQuiet(os); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemProxySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemProxySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemProxySelfTest.java index ef3bf18..4288455 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemProxySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsLocalSecondaryFileSystemProxySelfTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteBiInClosure; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for PROXY mode with local FS is configured as a secondary. */ +@RunWith(JUnit4.class) public class IgfsLocalSecondaryFileSystemProxySelfTest extends IgfsProxySelfTest { /** Fs work directory. */ private static final String FS_WORK_DIR = U.getIgniteHome() + File.separatorChar + "work" @@ -116,6 +120,7 @@ public class IgfsLocalSecondaryFileSystemProxySelfTest extends IgfsProxySelfTest * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testListPathForSymlink() throws Exception { if (U.isWindows()) return; @@ -138,6 +143,7 @@ public class IgfsLocalSecondaryFileSystemProxySelfTest extends IgfsProxySelfTest * * @throws Exception If failed. */ + @Test public void testDeleteSymlinkDir() throws Exception { if (U.isWindows()) return; @@ -154,6 +160,7 @@ public class IgfsLocalSecondaryFileSystemProxySelfTest extends IgfsProxySelfTest * * @throws Exception If failed. */ + @Test public void testSymlinkToFile() throws Exception { if (U.isWindows()) return; @@ -167,6 +174,7 @@ public class IgfsLocalSecondaryFileSystemProxySelfTest extends IgfsProxySelfTest * * @throws Exception If failed. */ + @Test public void testMkdirsInsideSymlink() throws Exception { if (U.isWindows()) return; @@ -183,6 +191,7 @@ public class IgfsLocalSecondaryFileSystemProxySelfTest extends IgfsProxySelfTest * * @throws Exception If failed. */ + @Test public void testUsedSpaceSize() throws Exception { final int DIRS_COUNT = 5; final int DIRS_MAX_DEEP = 3; @@ -223,6 +232,7 @@ public class IgfsLocalSecondaryFileSystemProxySelfTest extends IgfsProxySelfTest /** * @throws Exception If failed. */ + @Test public void testAffinityMaxLen() throws Exception { awaitPartitionMapExchange(); @@ -344,4 +354,4 @@ public class IgfsLocalSecondaryFileSystemProxySelfTest extends IgfsProxySelfTest U.closeQuiet(os); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java index 26177de..0b68d93 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java @@ -38,6 +38,9 @@ import java.util.Collections; import java.util.Map; import java.util.UUID; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -50,6 +53,7 @@ import static org.apache.ignite.testframework.GridTestUtils.assertThrowsInherite /** * {@link IgfsMetaManager} test case. */ +@RunWith(JUnit4.class) public class IgfsMetaManagerSelfTest extends IgfsCommonAbstractTest { /** Test IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -131,6 +135,7 @@ public class IgfsMetaManagerSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testUpdateProperties() throws Exception { assertEmpty(mgr.directoryListing(ROOT_ID)); @@ -219,6 +224,7 @@ public class IgfsMetaManagerSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testStructure() throws Exception { IgfsEntryInfo rootInfo = IgfsUtils.createDirectory(ROOT_ID); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetricsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetricsSelfTest.java index 9c664e8..d3d0645 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetricsSelfTest.java @@ -38,6 +38,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -48,6 +51,7 @@ import static org.apache.ignite.igfs.IgfsMode.PRIMARY; /** * Test for IGFS metrics. */ +@RunWith(JUnit4.class) public class IgfsMetricsSelfTest extends IgfsCommonAbstractTest { /** Primary IGFS name. */ private static final String IGFS_PRIMARY = "igfs-primary"; @@ -213,6 +217,7 @@ public class IgfsMetricsSelfTest extends IgfsCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testMetrics() throws Exception { IgniteFileSystem fs = igfsPrimary[0]; @@ -353,6 +358,7 @@ public class IgfsMetricsSelfTest extends IgfsCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testMultipleClose() throws Exception { IgniteFileSystem fs = igfsPrimary[0]; @@ -378,6 +384,7 @@ public class IgfsMetricsSelfTest extends IgfsCommonAbstractTest { * @throws Exception If failed. */ @SuppressWarnings({"ResultOfMethodCallIgnored", "ConstantConditions"}) + @Test public void testBlockMetrics() throws Exception { IgfsEx igfs = (IgfsEx)igfsPrimary[0]; @@ -529,4 +536,4 @@ public class IgfsMetricsSelfTest extends IgfsCommonAbstractTest { assertEquals(blocksWriteRemote, metrics.blocksWrittenRemote() - initMetrics.blocksWrittenRemote()); assertEquals(bytesWrite, metrics.bytesWritten() - initMetrics.bytesWritten()); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java index 2b231cd..f8392a4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModeResolverSelfTest.java @@ -27,6 +27,11 @@ import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.igfs.IgfsMode; import org.apache.ignite.igfs.IgfsPath; import org.apache.ignite.internal.util.typedef.T2; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + import static org.apache.ignite.igfs.IgfsMode.DUAL_ASYNC; import static org.apache.ignite.igfs.IgfsMode.DUAL_SYNC; import static org.apache.ignite.igfs.IgfsMode.PRIMARY; @@ -35,12 +40,14 @@ import static org.apache.ignite.igfs.IgfsMode.PROXY; /** * */ +@RunWith(JUnit4.class) public class IgfsModeResolverSelfTest extends TestCase { /** */ private IgfsModeResolver reslvr; /** {@inheritDoc} */ - @Override protected void setUp() throws Exception { + @Before + @Override public void setUp() throws Exception { reslvr = new IgfsModeResolver(DUAL_SYNC, new ArrayList<>(Arrays.asList(new T2<>( new IgfsPath("/a/b/c/d"), PROXY), new T2<>(new IgfsPath("/a/P/"), PRIMARY), new T2<>(new IgfsPath("/a/b/"), DUAL_ASYNC)))); @@ -49,6 +56,7 @@ public class IgfsModeResolverSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testCanContain() throws Exception { for (IgfsMode m: IgfsMode.values()) { // Each mode can contain itself: @@ -68,6 +76,7 @@ public class IgfsModeResolverSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testResolve() throws Exception { assertEquals(DUAL_SYNC, reslvr.resolveMode(IgfsPath.ROOT)); assertEquals(DUAL_SYNC, reslvr.resolveMode(new IgfsPath("/a"))); @@ -89,6 +98,7 @@ public class IgfsModeResolverSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testModesValidation() throws Exception { // Another mode inside PRIMARY directory: try { @@ -148,6 +158,7 @@ public class IgfsModeResolverSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testDualParentsWithPrimaryChild() throws Exception { Set<IgfsPath> set = new HashSet<>(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModesSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModesSelfTest.java index cd3bacc..135ffb3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsModesSelfTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -51,6 +54,7 @@ import static org.apache.ignite.igfs.IgfsMode.PROXY; /** * IGFS modes self test. */ +@RunWith(JUnit4.class) public class IgfsModesSelfTest extends IgfsCommonAbstractTest { /** Grid instance hosting primary IGFS. */ private IgniteEx grid; @@ -219,6 +223,7 @@ public class IgfsModesSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testModeDefaultIsNotSet() throws Exception { setSecondaryFs = true; @@ -232,6 +237,7 @@ public class IgfsModesSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testModeDefaultIsSet() throws Exception { mode = DUAL_SYNC; @@ -247,6 +253,7 @@ public class IgfsModesSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testModeSecondaryNoUri() throws Exception { mode = PROXY; @@ -268,6 +275,7 @@ public class IgfsModesSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testPathMode() throws Exception { pathModes(F.t("/dir1", PROXY), F.t("/dir2", DUAL_SYNC), F.t("/dir3", PRIMARY), F.t("/dir4", PRIMARY)); @@ -296,6 +304,7 @@ public class IgfsModesSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testPathModeSwitchToPrimary() throws Exception { mode = DUAL_SYNC; @@ -313,6 +322,7 @@ public class IgfsModesSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testPathModeSecondaryNoCfg() throws Exception { pathModes(F.t("dir", PROXY)); @@ -334,6 +344,7 @@ public class IgfsModesSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testPropagationPrimary() throws Exception { mode = PRIMARY; @@ -345,6 +356,7 @@ public class IgfsModesSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testPropagationDualSync() throws Exception { mode = DUAL_SYNC; @@ -356,6 +368,7 @@ public class IgfsModesSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testPropagationDualAsync() throws Exception { mode = DUAL_ASYNC; @@ -484,4 +497,4 @@ public class IgfsModesSelfTest extends IgfsCommonAbstractTest { assert !igfsSecondary.exists(dir); assert !igfsSecondary.exists(file); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsOneClientNodeTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsOneClientNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsOneClientNodeTest.java index a55f607..dfd70d6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsOneClientNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsOneClientNodeTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -37,6 +40,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Test for igfs with one node in client mode. */ +@RunWith(JUnit4.class) public class IgfsOneClientNodeTest extends GridCommonAbstractTest { /** Regular cache name. */ private static final String CACHE_NAME = "cache"; @@ -94,6 +98,7 @@ public class IgfsOneClientNodeTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStartIgfs() throws Exception { final IgfsImpl igfs = (IgfsImpl) grid(0).fileSystem("igfs"); @@ -124,4 +129,4 @@ public class IgfsOneClientNodeTest extends GridCommonAbstractTest { } }, IgfsException.class, "Failed to execute operation because there are no IGFS metadata nodes."); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryMultiNodeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryMultiNodeSelfTest.java index f004d40..0969cfd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryMultiNodeSelfTest.java @@ -17,9 +17,14 @@ package org.apache.ignite.internal.processors.igfs; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + /** * Multinode test for PRIMARY mode. */ +@RunWith(JUnit4.class) public class IgfsPrimaryMultiNodeSelfTest extends IgfsPrimarySelfTest { /** {@inheritDoc} */ @Override protected int nodeCount() { @@ -29,7 +34,8 @@ public class IgfsPrimaryMultiNodeSelfTest extends IgfsPrimarySelfTest { /** * @throws Exception If failed. */ + @Test @Override public void testCreateConsistencyMultithreaded() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8823"); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest.java index d35237c..a3f11a2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest.java @@ -17,19 +17,24 @@ package org.apache.ignite.internal.processors.igfs; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + /** * Tests for PRIMARY mode and relaxed consistency model. */ +@RunWith(JUnit4.class) public class IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest extends IgfsPrimaryRelaxedConsistencySelfTest { /** {@inheritDoc} */ @Override protected int nodeCount() { return 4; } - @Override - public void testCreateConsistencyMultithreaded() throws Exception { + @Test + @Override public void testCreateConsistencyMultithreaded() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8823"); super.testCreateConsistencyMultithreaded(); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java index 33ea8f8..9e45902 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java @@ -57,6 +57,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.nio.charset.StandardCharsets.UTF_8; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -66,6 +69,7 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * Tests for {@link IgfsProcessor}. */ +@RunWith(JUnit4.class) public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest { /** Test IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -164,6 +168,7 @@ public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testigfsEnabled() throws Exception { IgniteFileSystem igfs = grid(0).fileSystem(igfsName()); @@ -175,6 +180,7 @@ public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testUpdateProperties() throws Exception { IgfsPath p = path("/tmp/my"); @@ -208,6 +214,7 @@ public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testCreate() throws Exception { IgfsPath path = path("/file"); @@ -234,6 +241,7 @@ public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest { * * @throws Exception In case of any exception. */ + @Test public void testMakeListDeleteDirs() throws Exception { assertListDir("/"); @@ -292,6 +300,7 @@ public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest { * @throws Exception In case of any exception. */ @SuppressWarnings("TooBroadScope") + @Test public void testMakeListDeleteDirsMultithreaded() throws Exception { assertListDir("/"); @@ -342,6 +351,7 @@ public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testBasicOps() throws Exception { // Create directories. igfs.mkdirs(path("/A/B1/C1")); @@ -422,6 +432,7 @@ public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testSize() throws Exception { IgfsPath dir1 = path("/dir1"); IgfsPath subDir1 = path("/dir1/subdir1"); @@ -468,6 +479,7 @@ public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testRename() throws Exception { // Create directories. igfs.mkdirs(path("/A/B1/C1")); @@ -615,6 +627,7 @@ public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testCreateOpenAppend() throws Exception { // Error - path points to root directory. assertCreateFails("/", false); @@ -675,6 +688,7 @@ public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest { /** @throws Exception If failed. */ @SuppressWarnings("BusyWait") + @Test public void testDeleteCacheConsistency() throws Exception { IgfsPath path = new IgfsPath("/someFile"); @@ -734,21 +748,25 @@ public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testCreateAppendLongData1() throws Exception { checkCreateAppendLongData(123, 1024, 100); } /** @throws Exception If failed. */ + @Test public void testCreateAppendLongData2() throws Exception { checkCreateAppendLongData(123 + 1024, 1024, 100); } /** @throws Exception If failed. */ + @Test public void testCreateAppendLongData3() throws Exception { checkCreateAppendLongData(123, 1024, 1000); } /** @throws Exception If failed. */ + @Test public void testCreateAppendLongData4() throws Exception { checkCreateAppendLongData(123 + 1024, 1024, 1000); } @@ -758,6 +776,7 @@ public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testFormatNonEmpty() throws Exception { String dirPath = "/A/B/C"; @@ -792,6 +811,7 @@ public class IgfsProcessorSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testFormatEmpty() throws Exception { igfs.clear(); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorValidationSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorValidationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorValidationSelfTest.java index ee7a36d..a82e001 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorValidationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorValidationSelfTest.java @@ -36,6 +36,9 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.igfs.IgfsMode.DUAL_ASYNC; @@ -50,6 +53,7 @@ import static org.apache.ignite.igfs.IgfsMode.PROXY; * <p> * Tests starting with "testRemote" are checking {@link IgfsProcessor#checkIgfsOnRemoteNode(org.apache.ignite.cluster.ClusterNode)}. */ +@RunWith(JUnit4.class) public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -114,6 +118,7 @@ public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLocalIfAffinityMapperIsWrongClass() throws Exception { for (FileSystemConfiguration igfsCfg : g1Cfg.getFileSystemConfiguration()) { @@ -130,6 +135,7 @@ public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLocalIfIgfsConfigsHaveDuplicatedNames() throws Exception { String igfsCfgName = "igfs-cfg"; @@ -142,6 +148,7 @@ public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLocalIfQueryIndexingEnabledForDataCache() throws Exception { g1IgfsCfg1.setDataCacheConfiguration(dataCache(1024)); g1IgfsCfg1.getDataCacheConfiguration().setIndexedTypes(Integer.class, String.class); @@ -152,6 +159,7 @@ public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLocalIfQueryIndexingEnabledForMetaCache() throws Exception { g1IgfsCfg1.setMetaCacheConfiguration(metaCache()); @@ -163,6 +171,7 @@ public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLocalNullIgfsNameIsNotSupported() throws Exception { try { g1IgfsCfg1.setName(null); @@ -185,6 +194,7 @@ public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLocalIfNonPrimaryModeAndHadoopFileSystemUriIsNull() throws Exception { g1IgfsCfg2.setDefaultMode(PROXY); @@ -194,6 +204,7 @@ public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRemoteIfDataBlockSizeDiffers() throws Exception { IgniteConfiguration g2Cfg = getConfiguration("g2"); @@ -211,6 +222,7 @@ public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRemoteIfAffinityMapperGroupSizeDiffers() throws Exception { IgniteConfiguration g2Cfg = getConfiguration("g2"); @@ -226,6 +238,7 @@ public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRemoteIfDefaultModeDiffers() throws Exception { IgniteConfiguration g2Cfg = getConfiguration("g2"); @@ -248,6 +261,7 @@ public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRemoteIfPathModeDiffers() throws Exception { IgniteConfiguration g2Cfg = getConfiguration("g2"); @@ -267,6 +281,7 @@ public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testZeroEndpointTcpPort() throws Exception { checkInvalidPort(0); } @@ -274,6 +289,7 @@ public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNegativeEndpointTcpPort() throws Exception { checkInvalidPort(-1); } @@ -281,6 +297,7 @@ public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTooBigEndpointTcpPort() throws Exception { checkInvalidPort(65536); } @@ -288,6 +305,7 @@ public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPreConfiguredCache() throws Exception { FileSystemConfiguration igfsCfg1 = new FileSystemConfiguration(g1IgfsCfg1); igfsCfg1.setName("igfs"); @@ -334,6 +352,7 @@ public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testInvalidEndpointThreadCount() throws Exception { final String failMsg = "IGFS endpoint thread count must be positive"; @@ -403,4 +422,4 @@ public class IgfsProcessorValidationSelfTest extends IgfsCommonAbstractTest { return metaCache; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSecondaryFileSystemInjectionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSecondaryFileSystemInjectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSecondaryFileSystemInjectionSelfTest.java index c40be7d..fb12e88 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSecondaryFileSystemInjectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSecondaryFileSystemInjectionSelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -48,6 +51,7 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * Tests for resource injection to secondary file system. */ +@RunWith(JUnit4.class) public class IgfsSecondaryFileSystemInjectionSelfTest extends GridCommonAbstractTest { /** IGFS name. */ protected static final String IGFS_NAME = "igfs-test"; @@ -93,6 +97,7 @@ public class IgfsSecondaryFileSystemInjectionSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testInjectPrimaryByField() throws Exception { secondary = new TestBaseSecondaryFsMock() { @FileSystemResource @@ -119,6 +124,7 @@ public class IgfsSecondaryFileSystemInjectionSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testInjectPrimaryByMethods() throws Exception { secondary = new TestBaseSecondaryFsMock() { /** Ignite instance. */ http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java index 0d65bb8..da431c5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.configuration.FileSystemConfiguration.DFLT_MGMT_PORT; @@ -48,6 +51,7 @@ import static org.apache.ignite.configuration.FileSystemConfiguration.DFLT_MGMT_ /** * Base test class for {@link IgfsServer} checking IPC endpoint registrations. */ +@RunWith(JUnit4.class) public abstract class IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest extends IgfsCommonAbstractTest { /** IP finder. */ protected static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -62,6 +66,7 @@ public abstract class IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest e /** * @throws Exception If failed. */ + @Test public void testLoopbackEndpointsRegistration() throws Exception { IgniteConfiguration cfg = gridConfiguration(); @@ -81,6 +86,7 @@ public abstract class IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest e /** * @throws Exception If failed. */ + @Test public void testLoopbackEndpointsCustomHostRegistration() throws Exception { IgniteConfiguration cfg = gridConfigurationManyIgfsCaches(2); @@ -263,4 +269,4 @@ public abstract class IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest e return igfsConfiguration; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java index 030c852..2ec7a38 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest.java @@ -22,16 +22,21 @@ import org.apache.ignite.igfs.IgfsIpcEndpointConfiguration; import org.apache.ignite.igfs.IgfsIpcEndpointType; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.internal.util.typedef.T2; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link IgfsServer} that checks all IPC endpoint registration types * permitted for Linux and Mac OS. */ +@RunWith(JUnit4.class) public class IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest extends IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testLoopbackAndShmemEndpointsRegistration() throws Exception { IgniteConfiguration cfg = gridConfigurationManyIgfsCaches(3); @@ -51,4 +56,4 @@ public class IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest assertEquals(4, res.get1().intValue()); assertEquals(2, res.get2().intValue()); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java index b16beb1..0ac420d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest.java @@ -25,16 +25,21 @@ import org.apache.ignite.internal.util.ipc.loopback.IpcServerTcpEndpoint; import org.apache.ignite.internal.util.ipc.shmem.IpcSharedMemoryServerEndpoint; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link IgfsServerManager} that checks shmem IPC endpoint registration * forbidden for Windows. */ +@RunWith(JUnit4.class) public class IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest extends IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testShmemEndpointsRegistration() throws Exception { Throwable e = GridTestUtils.assertThrows(log, new Callable<Object>() { @Override public Object call() throws Exception { @@ -50,4 +55,4 @@ public class IgfsServerManagerIpcEndpointRegistrationOnWindowsSelfTest assert e.getCause().getCause().getMessage().contains(" should not be configured on Windows (configure " + IpcServerTcpEndpoint.class.getSimpleName() + ")"); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSizeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSizeSelfTest.java index d37cd9c..3b9b5a0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSizeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSizeSelfTest.java @@ -52,6 +52,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -61,6 +64,7 @@ import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; /** * {@link IgfsAttributes} test case. */ +@RunWith(JUnit4.class) public class IgfsSizeSelfTest extends IgfsCommonAbstractTest { /** How many grids to start. */ private static final int GRID_CNT = 3; @@ -173,6 +177,7 @@ public class IgfsSizeSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testPartitioned() throws Exception { cacheMode = PARTITIONED; nearEnabled = true; @@ -185,6 +190,7 @@ public class IgfsSizeSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testColocated() throws Exception { cacheMode = PARTITIONED; nearEnabled = false; @@ -197,6 +203,7 @@ public class IgfsSizeSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testReplicated() throws Exception { cacheMode = REPLICATED; @@ -208,6 +215,7 @@ public class IgfsSizeSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testPartitionedOversize() throws Exception { cacheMode = PARTITIONED; nearEnabled = true; @@ -220,6 +228,7 @@ public class IgfsSizeSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testColocatedOversize() throws Exception { cacheMode = PARTITIONED; nearEnabled = false; @@ -232,6 +241,7 @@ public class IgfsSizeSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testReplicatedOversize() throws Exception { cacheMode = REPLICATED; @@ -243,6 +253,7 @@ public class IgfsSizeSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testPartitionedPreload() throws Exception { cacheMode = PARTITIONED; nearEnabled = true; @@ -255,6 +266,7 @@ public class IgfsSizeSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testColocatedPreload() throws Exception { cacheMode = PARTITIONED; nearEnabled = false; @@ -709,4 +721,4 @@ public class IgfsSizeSelfTest extends IgfsCommonAbstractTest { return len; } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStartCacheTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStartCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStartCacheTest.java index 46fdae5..9c13265 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStartCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStartCacheTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.testframework.GridTestUtils; import java.io.BufferedWriter; import java.io.OutputStreamWriter; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -47,6 +50,7 @@ import static org.apache.ignite.internal.managers.communication.GridIoPolicy.SYS /** * */ +@RunWith(JUnit4.class) public class IgfsStartCacheTest extends IgfsCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -106,6 +110,7 @@ public class IgfsStartCacheTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCacheStart() throws Exception { Ignite g0 = G.start(config(true, 0)); @@ -165,4 +170,4 @@ public class IgfsStartCacheTest extends IgfsCommonAbstractTest { assertTrue(cache.context().systemTx()); assertEquals(SYSTEM_POOL, cache.context().ioPolicy()); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java index c8571d3..cbdc6ef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsStreamsSelfTest.java @@ -52,6 +52,9 @@ import java.util.UUID; import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.atomic.AtomicInteger; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -61,6 +64,7 @@ import static org.apache.ignite.testframework.GridTestUtils.runMultiThreaded; /** * Tests for IGFS streams content. */ +@RunWith(JUnit4.class) public class IgfsStreamsSelfTest extends IgfsCommonAbstractTest { /** Test IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -158,6 +162,7 @@ public class IgfsStreamsSelfTest extends IgfsCommonAbstractTest { * * @throws Exception In case of exception. */ + @Test public void testCreateFile() throws Exception { IgfsPath path = new IgfsPath("/asdf"); @@ -171,6 +176,7 @@ public class IgfsStreamsSelfTest extends IgfsCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testCreateFileColocated() throws Exception { IgfsPath path = new IgfsPath("/colocated"); @@ -209,6 +215,7 @@ public class IgfsStreamsSelfTest extends IgfsCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testCreateFileFragmented() throws Exception { IgfsEx impl = (IgfsEx)grid(0).fileSystem("igfs"); String metaCacheName = grid(0).igfsx("igfs").configuration().getMetaCacheConfiguration().getName(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsTaskSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsTaskSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsTaskSelfTest.java index f959077..27163d2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsTaskSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsTaskSelfTest.java @@ -50,6 +50,9 @@ import java.io.Serializable; import java.util.Collections; import java.util.List; import java.util.Random; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -60,6 +63,7 @@ import static org.apache.ignite.igfs.IgfsMode.PRIMARY; /** * Tests for {@link IgfsTask}. */ +@RunWith(JUnit4.class) public class IgfsTaskSelfTest extends IgfsCommonAbstractTest { /** Predefined words dictionary. */ private static final String[] DICTIONARY = new String[] {"word0", "word1", "word2", "word3", "word4", "word5", @@ -149,6 +153,7 @@ public class IgfsTaskSelfTest extends IgfsCommonAbstractTest { * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testTask() throws Exception { String arg = DICTIONARY[new Random(System.currentTimeMillis()).nextInt(DICTIONARY.length)]; @@ -168,6 +173,7 @@ public class IgfsTaskSelfTest extends IgfsCommonAbstractTest { * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testTaskAsync() throws Exception { String arg = DICTIONARY[new Random(System.currentTimeMillis()).nextInt(DICTIONARY.length)]; @@ -287,4 +293,4 @@ public class IgfsTaskSelfTest extends IgfsCommonAbstractTest { // No-op. } } -} \ No newline at end of file +}
