ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntikho...@apache.org
Subject [19/35] ignite git commit: Added tests.
Date Tue, 15 Mar 2016 18:18:15 GMT
Added tests.


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

Branch: refs/heads/ignite-2791
Commit: 21cfc2bf613e66f7493012ed675bac1eac4d084e
Parents: 67db264
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Mar 11 12:01:42 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri Mar 11 12:01:42 2016 +0300

----------------------------------------------------------------------
 .../IgniteDynamicClientCacheStartSelfTest.java  | 29 ++++++++++++++++----
 1 file changed, 24 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/21cfc2bf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java
index cc7120e..b661b52 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicClientCacheStartSelfTest.java
@@ -257,7 +257,22 @@ public class IgniteDynamicClientCacheStartSelfTest extends GridCommonAbstractTes
     /**
      * @throws Exception If failed.
      */
-    public void testCreateCloseClientCache2() throws Exception {
+    public void testCreateCloseClientCache2_1() throws Exception {
+        createCloseClientCache2(false);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testCreateCloseClientCache2_2() throws Exception {
+        createCloseClientCache2(true);
+    }
+
+    /**
+     * @param createFromCacheClient If {@code true} creates cache from cache client node.
+     * @throws Exception If failed.
+     */
+    private void createCloseClientCache2(boolean createFromCacheClient) throws Exception
{
         Ignite ignite0 = startGrid(0);
 
         Ignite ignite1 = startGrid(1);
@@ -266,15 +281,19 @@ public class IgniteDynamicClientCacheStartSelfTest extends GridCommonAbstractTes
 
         ccfg.setNodeFilter(new CachePredicate(F.asList(ignite0.name())));
 
-        ignite1.createCache(ccfg);
+        if (createFromCacheClient)
+            ignite0.createCache(ccfg);
+        else {
+            ignite1.createCache(ccfg);
 
-        assertNull(((IgniteKernal)ignite0).context().cache().internalCache(null));
+            assertNull(((IgniteKernal)ignite0).context().cache().internalCache(null));
+        }
 
-        ignite0.cache(null);
+        assertNotNull(ignite0.cache(null));
 
         ignite0.cache(null).close();
 
-        ignite0.cache(null);
+        assertNotNull(ignite0.cache(null));
 
         startGrid(2);
 


Mime
View raw message