Permalink
Browse files

[SM-2110] Chaged the default group username/password inside the hazel…

…cast store test.

git-svn-id: https://svn.apache.org/repos/asf/servicemix/utils/trunk@1146122 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 31afc6a commit e9ac5ddc392a152789f693aa921d317c2f461ee0 @iocanel iocanel committed Jul 13, 2011
Showing with 9 additions and 2 deletions.
  1. +9 −2 src/test/java/org/apache/servicemix/store/hazelcast/HazelcastStoreTest.java
@@ -17,6 +17,7 @@
package org.apache.servicemix.store.hazelcast;
+import com.hazelcast.config.Config;
import org.apache.servicemix.store.Entry;
import java.util.Map;
import com.hazelcast.core.Hazelcast;
@@ -34,11 +35,17 @@
private static final long TIMEOUT = 250L;
private Store store;
+ private Config config = new Config();
+
+
private final HazelcastStoreFactory factory = new HazelcastStoreFactory();
- private HazelcastInstance hazelcastInstance = Hazelcast.newHazelcastInstance(null);
+ private HazelcastInstance hazelcastInstance=null;
public HazelcastStoreTest() {
super();
+ config.getGroupConfig().setName("testgroup");
+ config.getGroupConfig().setPassword("testpwd");
+ this.hazelcastInstance = Hazelcast.newHazelcastInstance(config);
factory.setTimeout(TIMEOUT);
factory.setHazelcastInstance(hazelcastInstance);
}
@@ -71,7 +78,7 @@ public void testTimeout() throws Exception {
public void testDistributesStoreAndLoad() throws Exception {
//Create a new Hazelcast instance
- HazelcastInstance instance = Hazelcast.newHazelcastInstance(null);
+ HazelcastInstance instance = Hazelcast.newHazelcastInstance(config);
Map map = instance.getMap(HazelcastStoreFactory.STORE_PREFIX+".test");
String id = "testId";

0 comments on commit e9ac5dd

Please sign in to comment.