Author: manik.surtani(a)jboss.com
Date: 2008-03-20 08:19:04 -0400 (Thu, 20 Mar 2008)
New Revision: 5455
Removed:
core/trunk/src/test/java/org/jboss/cache/replicated/ReplicationQueueTest.java
Log:
Repl queue test
Deleted: core/trunk/src/test/java/org/jboss/cache/replicated/ReplicationQueueTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/replicated/ReplicationQueueTest.java 2008-03-20
08:22:10 UTC (rev 5454)
+++
core/trunk/src/test/java/org/jboss/cache/replicated/ReplicationQueueTest.java 2008-03-20
12:19:04 UTC (rev 5455)
@@ -1,50 +0,0 @@
-package org.jboss.cache.replicated;
-
-import org.jboss.cache.Cache;
-import org.jboss.cache.DefaultCacheFactory;
-import org.jboss.cache.config.Configuration;
-import org.jboss.cache.misc.TestingUtil;
-import static org.testng.AssertJUnit.assertNotNull;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-@Test(groups = "functional")
-public class ReplicationQueueTest
-{
- private static final int COUNT = 10;
- private static final String CONFIG_FILE =
"META-INF/pess-repl-async-issue.xml";
- Cache cache, cache2;
-
- @BeforeMethod
- public void setUp() throws CloneNotSupportedException
- {
- cache = new DefaultCacheFactory().createCache(false);
- cache.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_ASYNC);
- cache.getConfiguration().setUseReplQueue(true);
- cache.getConfiguration().setReplQueueMaxElements(COUNT);
- cache.start();
-
- cache2 = new DefaultCacheFactory().createCache(cache.getConfiguration().clone());
-
- TestingUtil.blockUntilViewsReceived(60000, cache, cache2);
- }
-
- @AfterMethod
- public void tearDown()
- {
- TestingUtil.killCaches(cache, cache2);
- }
-
- public void testFailure() throws InterruptedException
- {
- for (int i = 0; i < COUNT; i++)
- {
- System.out.println("on put i = " + i);
- cache.put("/a/b/c" + i, "key", "value");
- assertNotNull(cache.get("/a/b/c" + i, "key"));
- }
- Thread.sleep(2000);
- for (int i = 0; i < COUNT; i++) assertNotNull("on get i = " + i,
cache2.get("/a/b/c" + i, "key"));
- }
-}
Show replies by date