Streamline withKeepBinary() tests

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

Branch: refs/heads/ignite-2693
Commit: 9c18bbee4086f9e76e2d5811c80b20b4402d6fde
Parents: a8f11c9
Author: Oddo Da <[email protected]>
Authored: Sun Mar 6 08:27:05 2016 -0600
Committer: Oddo Da <[email protected]>
Committed: Sun Mar 6 08:27:05 2016 -0600

----------------------------------------------------------------------
 .../junits/CacheWithKeepBinarySelfTest.java              | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9c18bbee/modules/core/src/test/java/org/apache/ignite/testframework/junits/CacheWithKeepBinarySelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/testframework/junits/CacheWithKeepBinarySelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/testframework/junits/CacheWithKeepBinarySelfTest.java
index bbbe64b..6d6c3a5 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/testframework/junits/CacheWithKeepBinarySelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/testframework/junits/CacheWithKeepBinarySelfTest.java
@@ -47,17 +47,17 @@ public class CacheWithKeepBinarySelfTest extends 
GridCommonAbstractTest {
         return cfg;
     }
 
-    public void testWithKeepBinaryOnNonBinaryCacheMarshaller() throws 
Exception {
+    public void testWithKeepBinary() throws Exception {
 
         /* test with a non-binary marshaller - should induce an exception */
         binaryCache = false;
-        final Ignite ignite = startGrid("non_binary");
+        final Ignite ignite = startGrid("binary_tests");
 
         GridTestUtils.assertThrows(
                 new GridStringLogger(false),
                 new Callable<IgniteCache<String,String>>() {
                     @Override public IgniteCache<String,String> call() throws 
Exception {
-                        IgniteCache<String, String> cacheNonBin = 
ignite.cache("non_binary").withKeepBinary();
+                        IgniteCache<String, String> cacheNonBin = 
ignite.cache(null).withKeepBinary();
                         return null;
                     }
                 },
@@ -65,12 +65,9 @@ public class CacheWithKeepBinarySelfTest extends 
GridCommonAbstractTest {
                 "error: withKeepBinary() cannot be invoked on a cache that has 
no binary marshaller"
         );
 
-        stopGrid();
-
         /* now test with a binary marshaller - should return a valid cache */
         binaryCache = true;
-        Ignite ignite2 = startGrid("binary");
-        IgniteCache<String, String> cacheNormal = ignite2.cache("binary");
+        IgniteCache<String, String> cacheNormal = ignite.cache("binary");
         cacheNormal.put("1","1");
         IgniteCache<String, BinaryObject> cacheBin = 
cacheNormal.withKeepBinary();
         BinaryObject binOb = cacheBin.get("1");

Reply via email to