Author: manik.surtani(a)jboss.com
Date: 2009-03-05 11:20:54 -0500 (Thu, 05 Mar 2009)
New Revision: 7859
Modified:
core/branches/flat/src/test/java/org/horizon/profiling/AbstractProfileTest.java
core/branches/flat/src/test/java/org/horizon/profiling/ProfileTest.java
Log:
Updated profile tests
Modified: core/branches/flat/src/test/java/org/horizon/profiling/AbstractProfileTest.java
===================================================================
---
core/branches/flat/src/test/java/org/horizon/profiling/AbstractProfileTest.java 2009-03-05
15:28:11 UTC (rev 7858)
+++
core/branches/flat/src/test/java/org/horizon/profiling/AbstractProfileTest.java 2009-03-05
16:20:54 UTC (rev 7859)
@@ -11,6 +11,7 @@
protected CacheManager createCacheManager() throws Exception {
Configuration cfg = new Configuration();
+ cfg.setConcurrencyLevel(2000);
cacheManager = new DefaultCacheManager(cfg);
cache = cacheManager.getCache();
return cacheManager;
Modified: core/branches/flat/src/test/java/org/horizon/profiling/ProfileTest.java
===================================================================
--- core/branches/flat/src/test/java/org/horizon/profiling/ProfileTest.java 2009-03-05
15:28:11 UTC (rev 7858)
+++ core/branches/flat/src/test/java/org/horizon/profiling/ProfileTest.java 2009-03-05
16:20:54 UTC (rev 7859)
@@ -1,8 +1,5 @@
package org.horizon.profiling;
-import org.horizon.Cache;
-import org.horizon.config.Configuration;
-import org.horizon.lock.IsolationLevel;
import org.horizon.profiling.testinternals.Generator;
import org.horizon.profiling.testinternals.TaskRunner;
import org.horizon.test.TestingUtil;
@@ -24,7 +21,7 @@
*
* @author Manik Surtani (<a
href="mailto:manik@jboss.org">manik@jboss.org</a>)
*/
-@Test(groups = "profiling", enabled = false, testName =
"profiling.ProfileTest")
+@Test(groups = "profiling", enabled = true, testName =
"profiling.ProfileTest")
public class ProfileTest extends AbstractProfileTest {
/*
Test configuration options
@@ -38,12 +35,8 @@
private List<Object> keys = new ArrayList<Object>(MAX_OVERALL_KEYS);
- @Test(enabled = false)
+ @Test(enabled = true)
public void testLocalMode() throws Exception {
- Cache c = (Cache) cache;
- c.getConfiguration().setCacheMode(Configuration.CacheMode.LOCAL);
- c.getConfiguration().setConcurrencyLevel(2000);
- c.getConfiguration().setIsolationLevel(IsolationLevel.REPEATABLE_READ);
runCompleteTest();
}
@@ -86,7 +79,7 @@
protected void startup() {
long startTime = System.currentTimeMillis();
log.warn("Starting cache");
- ((Cache) cache).start();
+ cache.start();
long duration = System.currentTimeMillis() - startTime;
log.warn("Started cache. " + printDuration(duration));
}
@@ -120,7 +113,7 @@
long duration = System.currentTimeMillis() - startTime;
log.warn("Finished warmup. " + printDuration(duration));
- ((Cache) cache).stop();
+ cache.stop();
startup();
}
Show replies by date