You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2015/06/25 17:55:29 UTC

[16/31] incubator-ignite git commit: # ignite-sprint-7 added test

# ignite-sprint-7 added test


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

Branch: refs/heads/ignite-gg-10457
Commit: b29ff1cb24ff344fb624a803cf210cae9f9001d2
Parents: c270bd8
Author: sboikov <sb...@gridgain.com>
Authored: Wed Jun 24 15:40:56 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Jun 24 15:40:56 2015 +0300

----------------------------------------------------------------------
 .../cache/IgniteDynamicCacheStartSelfTest.java  | 37 ++++++++++++++++++++
 1 file changed, 37 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b29ff1cb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
index 7905565..9c483ef 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
@@ -1105,4 +1105,41 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest {
 
         fut.get();
     }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testStartStopSameCacheMultinode() throws Exception {
+        fail("https://issues.apache.org/jira/browse/IGNITE-993");
+
+        final AtomicInteger idx = new AtomicInteger();
+
+        IgniteInternalFuture<?> fut = GridTestUtils.runMultiThreadedAsync(new Callable<Object>() {
+            @Override public Object call() throws Exception {
+                int node = idx.getAndIncrement();
+
+                Ignite ignite = ignite(node);
+
+                Thread.currentThread().setName("start-stop-" + ignite.name());
+
+                CacheConfiguration ccfg = new CacheConfiguration();
+
+                ccfg.setName("testStartStop");
+
+                for (int i = 0; i < 1000; i++) {
+                    log.info("Start cache: " + i);
+
+                    try (IgniteCache<Object, Object> cache = ignite.getOrCreateCache(ccfg)) {
+                        // No-op.
+                    }
+
+                    log.info("Stopped cache: " + i);
+                }
+
+                return null;
+            }
+        }, nodeCount(), "start-stop-cache");
+
+        fut.get();
+    }
 }