@Override protected void createCacheManagers() throws Throwable { Util.recursiveFileRemove(tmpDirectory); ConfigurationBuilder cfg = TestCacheManagerFactory.getDefaultCacheConfiguration(true); cfg.persistence() .addStore(SingleFileStoreConfigurationBuilder.class) .location(tmpDirectory); // ensure the data container contains minimal data so the store will need to be accessed to get the rest cfg.locking().concurrencyLevel(1).dataContainer().memory().size(1L); createClusteredCaches(1, cfg); } }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder cfg = getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC, true); cfg.clustering() .stateTransfer().fetchInMemoryState(true) .persistence() .addStore(DummyInMemoryStoreConfigurationBuilder.class) .purgeOnStartup(true); // ensure the data container contains minimal data so the store will need to be accessed to get the rest cfg.locking().concurrencyLevel(1).dataContainer().memory().size(1L); createClusteredCaches(2, cfg); } }
@Override protected void createCacheManagers() { tmpDir = new File(TestingUtil.tmpDirectory(this.getClass())); Util.recursiveFileRemove(tmpDir); // reproduce the MODE-1754 config as closely as possible builder = getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC, true, true); builder.transaction().transactionMode(TransactionMode.TRANSACTIONAL).lockingMode(LockingMode.PESSIMISTIC) .transactionManagerLookup(new EmbeddedTransactionManagerLookup()) .memory().size(1000) .locking().lockAcquisitionTimeout(20000) .concurrencyLevel(5000) // lowering this to 50 makes the test pass also on 5.2 but it's just a temporary workaround .useLockStriping(false).isolationLevel(IsolationLevel.READ_COMMITTED) .dataContainer().storeAsBinary() .clustering().remoteTimeout(20000) .stateTransfer().timeout(240000).fetchInMemoryState(false).chunkSize(10000) .persistence().passivation(false).addSingleFileStore().location(new File(tmpDir, "store0").getAbsolutePath()).shared(false).preload(false) .fetchPersistentState(true) .ignoreModifications(false) .purgeOnStartup(false); createCluster(builder, 1); waitForClusterToForm(); }