Clean all unused and redundant imports in controller.
[controller.git] / opendaylight / clustering / services_implementation / src / test / java / org / opendaylight / controller / clustering / services_implementation / internal / ClusterManagerTest.java
index 736a2b23ec8d9e63b074d2c7b194f6ae2b034859..d2a02c9f10cd803883839cadb09b1f4bd602e003 100644 (file)
@@ -1,15 +1,11 @@
 package org.opendaylight.controller.clustering.services_implementation.internal;
 
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
 
 import java.net.InetAddress;
-import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Properties;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
 
 import org.infinispan.CacheImpl;
 import org.junit.Assert;
@@ -89,8 +85,22 @@ public class ClusterManagerTest {
             Assert.assertTrue(true);
         }
 
-        // Create second cache properly this time, as non_transactional
+        // Create second cache NON_TRANSACTIONAL but with both ASYNC and SYNC,
+        // expect to complain
         cacheModeSet.remove(cacheMode.TRANSACTIONAL);
+        cacheModeSet.add(cacheMode.SYNC);
+        cacheModeSet.add(cacheMode.ASYNC);
+        try {
+            c2 = (CacheImpl<String, Integer>) cm.createCache("Container1", "Cache2", cacheModeSet);
+        } catch (CacheExistException cee) {
+            Assert.assertTrue(false);
+        } catch (CacheConfigException cce) {
+            Assert.assertTrue(true);
+        }
+
+        // Create second cache properly this time, as non_transactional and
+        // ASYNC
+        cacheModeSet.remove(cacheMode.SYNC);
         try {
             c2 = (CacheImpl<String, Integer>) cm.createCache("Container1",
                     "Cache2", cacheModeSet);