You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by nt...@apache.org on 2016/03/22 17:49:40 UTC
[04/50] [abbrv] ignite git commit: Added tests.
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-2004
Commit: 21cfc2bf613e66f7493012ed675bac1eac4d084e
Parents: 67db264
Author: sboikov <sb...@gridgain.com>
Authored: Fri Mar 11 12:01:42 2016 +0300
Committer: sboikov <sb...@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);