You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/03/17 10:28:34 UTC

ignite git commit: IGNITE-2813: Fixed a bug in test configuration.

Repository: ignite
Updated Branches:
  refs/heads/ignite-2813 bb553ea38 -> 7e7c6daf0


IGNITE-2813: Fixed a bug in test configuration.


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

Branch: refs/heads/ignite-2813
Commit: 7e7c6daf0735f9378c9266590de0d07b9fcf8b9e
Parents: bb553ea
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Mar 17 12:28:24 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Mar 17 12:28:24 2016 +0300

----------------------------------------------------------------------
 .../processors/igfs/IgfsStartCacheTest.java     | 26 +++++++++++---------
 1 file changed, 15 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7e7c6daf/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 56559cb..263b469 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
@@ -85,7 +85,7 @@ public class IgfsStartCacheTest extends IgfsCommonAbstractTest {
             metaCacheCfg.setName("metaCache");
             metaCacheCfg.setCacheMode(REPLICATED);
             metaCacheCfg.setAtomicityMode(TRANSACTIONAL);
-            dataCacheCfg.setWriteSynchronizationMode(FULL_SYNC);
+            metaCacheCfg.setWriteSynchronizationMode(FULL_SYNC);
 
             cfg.setCacheConfiguration(dataCacheCfg, metaCacheCfg);
             cfg.setFileSystemConfiguration(igfsCfg);
@@ -107,23 +107,27 @@ public class IgfsStartCacheTest extends IgfsCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testCacheStart() throws Exception {
-        Ignite g0 = G.start(config(true, 0));
+        while (true) {
+            Ignite g0 = G.start(config(true, 0));
+
+            checkIgfsCaches(g0);
 
-        checkIgfsCaches(g0);
+            Ignite g1 = G.start(config(false, 1));
 
-        Ignite g1 = G.start(config(false, 1));
+            checkIgfsCaches(g1);
 
-        checkIgfsCaches(g1);
+            IgniteFileSystem igfs = g0.fileSystem("igfs");
 
-        IgniteFileSystem igfs = g0.fileSystem("igfs");
+            igfs.mkdirs(new IgfsPath("/test"));
 
-        igfs.mkdirs(new IgfsPath("/test"));
+            try (BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(igfs.create(
+                new IgfsPath("/test/test.file"), true)))) {
 
-        try (BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(igfs.create(
-            new IgfsPath("/test/test.file"), true)))) {
+                for (int i = 0; i < 1000; i++)
+                    bw.write("test-" + i);
+            }
 
-            for (int i = 0; i < 1000; i++)
-                bw.write("test-" + i);
+            afterTest();
         }
     }