Fixed Hazelcast itnegration tests, removing unusefull thread sleeps, but more important permitting the co existence of 2 Brokers in the same JVM
This commit is contained in:
@@ -36,6 +36,11 @@ public class IntegrationUtils {
|
||||
return currentDir + File.separator + DEFAULT_MOQUETTE_STORE_MAP_DB_FILENAME;
|
||||
}
|
||||
|
||||
static String localClusterMapDBPath(int port) {
|
||||
String currentDir = System.getProperty("user.dir");
|
||||
return currentDir + File.separator + port + DEFAULT_MOQUETTE_STORE_MAP_DB_FILENAME;
|
||||
}
|
||||
|
||||
public static Properties prepareTestProperties() {
|
||||
Properties testProperties = new Properties();
|
||||
testProperties.put(PERSISTENT_STORE_PROPERTY_NAME, IntegrationUtils.localMapDBPath());
|
||||
@@ -43,6 +48,13 @@ public class IntegrationUtils {
|
||||
return testProperties;
|
||||
}
|
||||
|
||||
public static Properties prepareTestClusterProperties(int port) {
|
||||
Properties testProperties = new Properties();
|
||||
testProperties.put(PERSISTENT_STORE_PROPERTY_NAME, IntegrationUtils.localClusterMapDBPath(port));
|
||||
testProperties.put(PORT_PROPERTY_NAME, Integer.toString(port));
|
||||
return testProperties;
|
||||
}
|
||||
|
||||
public static void cleanPersistenceFile(IConfig config) {
|
||||
String fileName = config.getProperty(PERSISTENT_STORE_PROPERTY_NAME);
|
||||
cleanPersistenceFile(fileName);
|
||||
|
||||
Reference in New Issue
Block a user