builder .memory().size(4096) .locking().concurrencyLevel(2048) .persistence().passivation(false) .addSingleFileStore().location(tmpDirectory).shared(false).preload(true);
@Override protected EmbeddedCacheManager createCacheManager() throws Exception { ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.LOCAL, true, true); builder.transaction().transactionMode(TransactionMode.TRANSACTIONAL).lockingMode(LockingMode.PESSIMISTIC) .transactionManagerLookup(new EmbeddedTransactionManagerLookup()) .memory().storageType(StorageType.BINARY).size(150) .locking().useLockStriping(false).isolationLevel(IsolationLevel.READ_COMMITTED) .persistence() .passivation(passivationEnabled) .addStore(DummyInMemoryStoreConfigurationBuilder.class) .storeName(getClass().getName()) .fetchPersistentState(true) .ignoreModifications(false) .preload(false) .purgeOnStartup(false); return TestCacheManagerFactory.createCacheManager(builder); }
@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(); }