protected static void setUpCluster(Class clazz) throws Exception { tcConfig = new TcConfig() .mirrorGroup( new TcMirrorGroup().server(new TcServer().managementPort(MANAGEMENT_PORT))); TestBaseUtil.jarFor(ResourceServiceImplITHelper.class); tcConfig.fillUpConfig(); clusterManager = new ClusterManager(clazz, tcConfig); clusterManager.addExtraJvmArg("-Xmx768m"); clusterManager.addExtraJvmArg("-XX:MaxPermSize=128m"); clusterManager.start(); cacheManagerMaxElements = getCacheManagerMaxEntries(); }
@AfterClass public static void tearDownCluster() throws Exception { if (cacheManagerMaxElements != null) { cacheManagerMaxElements.shutdown(); } clusterManager.stop(); }