Merge pull request #2467 from olamy/bugfix/hazelcast_testClusteredScavenge_2440

no need to create different map per test as we clear it
This commit is contained in:
Olivier Lamy 2018-04-20 19:51:51 +10:00 committed by GitHub
commit 2abc5928b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 11 deletions

View File

@ -42,17 +42,10 @@ public class HazelcastTestHelper
static String _hazelcastInstanceName = "SESSION_TEST_"+Long.toString( TimeUnit.NANOSECONDS.toMillis(System.nanoTime()));
static String _name = Long.toString( TimeUnit.NANOSECONDS.toMillis(System.nanoTime()) );
static HazelcastInstance _instance;
static {
MapConfig mapConfig = new MapConfig();
mapConfig.setName(_name);
Config config = new Config();
config.setInstanceName(_hazelcastInstanceName );
config.addMapConfig( mapConfig );
_instance = Hazelcast.getOrCreateHazelcastInstance( config );
}
static HazelcastInstance _instance = Hazelcast.getOrCreateHazelcastInstance( new Config() //
.setInstanceName(_hazelcastInstanceName ) //
.addMapConfig( new MapConfig().setName(_name) ) );
public HazelcastTestHelper ()
{
// noop
@ -63,7 +56,7 @@ public class HazelcastTestHelper
public SessionDataStoreFactory createSessionDataStoreFactory(boolean onlyClient)
{
HazelcastSessionDataStoreFactory factory = new HazelcastSessionDataStoreFactory();
_name = Long.toString( TimeUnit.NANOSECONDS.toMillis(System.nanoTime()) );
//_name = Long.toString( TimeUnit.NANOSECONDS.toMillis(System.nanoTime()) );
factory.setOnlyClient( onlyClient );
factory.setMapName(_name);
factory.setHazelcastInstance(_instance);