-
-
Save galderz/9d5ab3623f57ec8b23ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void testClusterCacheManagerRestart() { | |
withCacheManagers(new MultiCacheManagerCallable( | |
TestCacheManagerFactory.createCacheManager(CacheMode.REPL_SYNC, false), | |
TestCacheManagerFactory.createCacheManager(CacheMode.REPL_SYNC, false)) { | |
@Override | |
public void call() { | |
EmbeddedCacheManager cm1 = cms[0]; | |
EmbeddedCacheManager cm2 = cms[1]; | |
Cache<Object, Object> c1 = cm1.getCache(); | |
cm2.getCache(); | |
GlobalConfiguration globalCfg = cm1.getCacheManagerConfiguration(); | |
Configuration cfg = c1.getCacheConfiguration(); | |
cm1.stop(); | |
cm1 = new DefaultCacheManager(globalCfg, cfg); | |
try { | |
cm1.getCache(); | |
} finally { | |
TestingUtil.killCacheManagers(cm1); | |
} | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment