JBoss Cache SVN: r4575 - core/trunk/src/test/java/org/jboss/cache/eviction/minttl.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-10-08 12:39:54 -0400 (Mon, 08 Oct 2007)
New Revision: 4575
Modified:
core/trunk/src/test/java/org/jboss/cache/eviction/minttl/MinTTLTestBase.java
Log:
Incorrectly annotated superclass was causing subclass tests to fail
Modified: core/trunk/src/test/java/org/jboss/cache/eviction/minttl/MinTTLTestBase.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/eviction/minttl/MinTTLTestBase.java 2007-10-08 16:26:26 UTC (rev 4574)
+++ core/trunk/src/test/java/org/jboss/cache/eviction/minttl/MinTTLTestBase.java 2007-10-08 16:39:54 UTC (rev 4575)
@@ -28,6 +28,7 @@
* @author <a href="mailto:manik@jboss.org">Manik Surtani</a>
* @since 2.1.0
*/
+@Test(groups = {"functional"})
public abstract class MinTTLTestBase
{
// this should ideally be in an eviction test base class so all eviction policies can be tested
@@ -72,7 +73,6 @@
cache.stop();
}
- @Test(groups = {"functional"})
public void testNoMinimumTTL()
{
cache.start();
@@ -87,7 +87,6 @@
assert cache.get(fqn, "k") == null : "Node should have been evicted";
}
- @Test(groups = {"functional"})
public void testWithMinimumTTL()
{
((EvictionPolicyConfigBase) cache.getConfiguration().getEvictionConfig().getEvictionRegionConfigs().get(0).getEvictionPolicyConfig()).setMinTimeToLiveSeconds(3);
16 years, 6 months
JBoss Cache SVN: r4574 - core/trunk/src/test/java/org/jboss/cache/marshall.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-10-08 12:26:26 -0400 (Mon, 08 Oct 2007)
New Revision: 4574
Modified:
core/trunk/src/test/java/org/jboss/cache/marshall/VersionAwareMarshallerTest.java
Log:
Updated the new expected version header
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/VersionAwareMarshallerTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/VersionAwareMarshallerTest.java 2007-10-08 16:23:05 UTC (rev 4573)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/VersionAwareMarshallerTest.java 2007-10-08 16:26:26 UTC (rev 4574)
@@ -55,7 +55,7 @@
// expect that this has been serialized using JBoss Serialization so use this to get an OIS.
ObjectInputStream in = ObjectSerializationFactory.createObjectInputStream(bytes);
- assertEquals("Version header short should be '20'", 20, in.readShort());
+ assertEquals("Version header short should be '21'", 21, in.readShort());
}
public void testVersionHeader200() throws Exception
16 years, 6 months
JBoss Cache SVN: r4573 - core/trunk/src/test/java/org/jboss/cache/marshall.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-10-08 12:23:05 -0400 (Mon, 08 Oct 2007)
New Revision: 4573
Modified:
core/trunk/src/test/java/org/jboss/cache/marshall/RedeploymentEmulationTest.java
Log:
Disabled test
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/RedeploymentEmulationTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/RedeploymentEmulationTest.java 2007-10-08 16:20:21 UTC (rev 4572)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/RedeploymentEmulationTest.java 2007-10-08 16:23:05 UTC (rev 4573)
@@ -32,7 +32,7 @@
*
* @author <a href="mailto:galder.zamarreno@jboss.com">Galder Zamarreno</a>
*/
-@Test(groups = {"functional"})
+@Test(groups = {"functional"}, enabled = false) // this relies on an old project structure that no longer exists
public class RedeploymentEmulationTest
{
private Cache<Object, Object> cache;
16 years, 6 months
JBoss Cache SVN: r4572 - core/trunk/src/test/java/org/jboss/cache/marshall.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-10-08 12:20:21 -0400 (Mon, 08 Oct 2007)
New Revision: 4572
Removed:
core/trunk/src/test/java/org/jboss/cache/marshall/LocalTest.java
Log:
Removed deprecated test
Deleted: core/trunk/src/test/java/org/jboss/cache/marshall/LocalTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/LocalTest.java 2007-10-08 16:17:04 UTC (rev 4571)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/LocalTest.java 2007-10-08 16:20:21 UTC (rev 4572)
@@ -1,155 +0,0 @@
-package org.jboss.cache.marshall;
-
-import static org.testng.AssertJUnit.assertEquals;
-import static org.testng.AssertJUnit.assertNotNull;
-
-import java.io.File;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.net.URLClassLoader;
-
-import javax.transaction.Transaction;
-
-import org.jboss.cache.CacheImpl;
-import org.jboss.cache.DefaultCacheFactory;
-import org.jboss.cache.Fqn;
-import org.jboss.cache.config.Configuration;
-import org.jboss.cache.lock.IsolationLevel;
-import org.jboss.cache.marshall.data.Debug;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-/**
- * Simple functional tests for LegacyTreeCacheMarshaller
- *
- * @author Ben Wang
- * @version $Id$
- */
-@Test(groups = {"functional"})
-public class LocalTest extends RegionBasedMarshallingTestBase
-{
- CacheImpl<Object, Object> cache = null;
- Transaction tx = null;
- final Fqn FQN = Fqn.fromString("/myNode");
- final String KEY = "key";
- final String VALUE = "value";
- Exception ex;
-
- @BeforeMethod(alwaysRun = true)
- public void setUp() throws Exception
- {
- cache = (CacheImpl<Object, Object>) DefaultCacheFactory.getInstance().createCache(false);
- cache.getConfiguration().setCacheMode(Configuration.CacheMode.LOCAL);
- cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
- cache.getConfiguration().setIsolationLevel(IsolationLevel.REPEATABLE_READ);
- cache.create();
- cache.start();
- ex = null;
- }
-
- @AfterMethod(alwaysRun = true)
- public void tearDown() throws Exception
- {
- if (cache != null)
- {
- cache.stop();
- cache.destroy();
- cache = null;
- }
- if (ex != null)
- {
- throw ex;
- }
- }
-
- @SuppressWarnings("deprecation")
- public void testClassloader() throws Exception
- {
- String jarDir = System.getProperty("test.jar.dir");
- File jar0 = new File(jarDir + "/testMarshall.jar");
- URL[] cp0 = {jar0.toURL()};
- URLClassLoader ucl0 = new URLClassLoader(cp0);
- Thread.currentThread().setContextClassLoader(ucl0);
- Class clasz1 = ucl0.loadClass(PERSON_CLASSNAME);
- StringBuffer buffer = new StringBuffer("Person Info");
- Debug.displayClassInfo(clasz1, buffer, false);
- log(buffer.toString());
- Object ben = clasz1.newInstance();
- Object value;
- try
- {
- {
- Class[] types = {String.class};
- Method setValue = clasz1.getMethod("setName", types);
- Object[] margs = {"Ben"};
- value = setValue.invoke(ben, margs);
- }
- Class[] types = {};
- Object[] margs = {};
- Method getValue = clasz1.getMethod("getLastElementAsString", types);
- value = getValue.invoke(ben, margs);
- buffer.setLength(0);
- buffer.append("main.obj.CodeSource: ");
- Debug.displayClassInfo(value.getClass(), buffer, false);
- log(buffer.toString());
- }
- catch (Exception e)
- {
- e.printStackTrace();
- log("Failed to invoke getLastElementAsString: " + e);
- }
-
- cache.put("/a/b/c", "ben", ben);
- assertNotNull(cache.get("/a/b/c"));
- assertEquals(cache.get("/a/b/c", "ben"), ben);
- Object obj = cache.get("/a/b/c", "ben");
-
- Class claszAddr = ucl0.loadClass(ADDRESS_CLASSNAME);
- buffer = new StringBuffer("Address Info");
- Debug.displayClassInfo(claszAddr, buffer, false);
- log(buffer.toString());
- Object addr = claszAddr.newInstance();
- try
- {
- {
- Class[] types = {String.class};
- Method setValue = claszAddr.getMethod("setCity", types);
- Object[] margs = {"SF"};
- value = setValue.invoke(addr, margs);
- }
-
- {
- Class[] types = {claszAddr};
- Method setValue = clasz1.getMethod("setAddress", types);
- Object[] margs = {addr};
- value = setValue.invoke(obj, margs);
- }
-
- Class[] types = {};
- Object[] margs = {};
- Method getValue = clasz1.getMethod("getAddress", types);
- value = getValue.invoke(obj, margs);
- buffer.setLength(0);
- buffer.append("main.obj.CodeSource: ");
- Debug.displayClassInfo(value.getClass(), buffer, false);
- log(buffer.toString());
- }
- catch (Exception e)
- {
- e.printStackTrace();
- log("Failed to invoke: " + e);
- throw e;
- }
-
- }
-
- void log(String msg)
- {
- System.out.println("-- " + msg);
- }
-
- //public static void main(String[] args) {
- // junit.textui.TestRunner.run(suite());
- //}
-
-}
16 years, 6 months
JBoss Cache SVN: r4571 - core/trunk/src/test/java/org/jboss/cache/marshall.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-10-08 12:17:04 -0400 (Mon, 08 Oct 2007)
New Revision: 4571
Modified:
core/trunk/src/test/java/org/jboss/cache/marshall/RegionManagerTest.java
Log:
Fixed failing test
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/RegionManagerTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/RegionManagerTest.java 2007-10-08 16:11:58 UTC (rev 4570)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/RegionManagerTest.java 2007-10-08 16:17:04 UTC (rev 4571)
@@ -34,11 +34,13 @@
CacheImpl c = (CacheImpl) DefaultCacheFactory.getInstance().createCache(false);
c.create();
r = new RegionManager(c);
+ c.start();
}
@AfterMethod(alwaysRun = false)
public void tearDown() throws Exception
{
+ r.getCache().stop();
r = null;
}
16 years, 6 months
JBoss Cache SVN: r4570 - core/trunk/src/test/java/org/jboss/cache/buddyreplication.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-10-08 12:11:58 -0400 (Mon, 08 Oct 2007)
New Revision: 4570
Modified:
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithCacheLoaderTest.java
Log:
Annotated as a Test - so it can be run in an IDE
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithCacheLoaderTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithCacheLoaderTest.java 2007-10-08 16:11:41 UTC (rev 4569)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithCacheLoaderTest.java 2007-10-08 16:11:58 UTC (rev 4570)
@@ -30,6 +30,7 @@
*
* @author <a href="mailto:manik@jboss.org">Manik Surtani (manik(a)jboss.org)</a>
*/
+@Test (groups = {"functional"})
public class BuddyReplicationWithCacheLoaderTest extends BuddyReplicationTestsBase
{
16 years, 6 months
JBoss Cache SVN: r4569 - core/trunk/src/test/java/org/jboss/cache/lock.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-10-08 12:11:41 -0400 (Mon, 08 Oct 2007)
New Revision: 4569
Modified:
core/trunk/src/test/java/org/jboss/cache/lock/ReentrantWriterPreference2Readers1WriterLockTest.java
Log:
Disabled test - JBCACHE-461 related
Modified: core/trunk/src/test/java/org/jboss/cache/lock/ReentrantWriterPreference2Readers1WriterLockTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/lock/ReentrantWriterPreference2Readers1WriterLockTest.java 2007-10-08 16:06:30 UTC (rev 4568)
+++ core/trunk/src/test/java/org/jboss/cache/lock/ReentrantWriterPreference2Readers1WriterLockTest.java 2007-10-08 16:11:41 UTC (rev 4569)
@@ -23,7 +23,7 @@
* @author Bela Ban
* @version $Id$
*/
-@Test(groups = { "functional" })
+@Test(groups = { "functional" }, enabled = false) // historical disabled - and wont fix. See JBCACHE-461
public class ReentrantWriterPreference2Readers1WriterLockTest
{
ReentrantReadWriteLock lock;
16 years, 6 months
JBoss Cache SVN: r4568 - core/trunk/src/test/java/org/jboss/cache/statetransfer.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-10-08 12:06:30 -0400 (Mon, 08 Oct 2007)
New Revision: 4568
Modified:
core/trunk/src/test/java/org/jboss/cache/statetransfer/ForcedStateTransferTest.java
Log:
Disabled test - JBCACHE-315 related
Modified: core/trunk/src/test/java/org/jboss/cache/statetransfer/ForcedStateTransferTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/statetransfer/ForcedStateTransferTest.java 2007-10-08 15:58:57 UTC (rev 4567)
+++ core/trunk/src/test/java/org/jboss/cache/statetransfer/ForcedStateTransferTest.java 2007-10-08 16:06:30 UTC (rev 4568)
@@ -45,7 +45,7 @@
* @author Brian Stansberry
* @version $Revision$
*/
-@Test(groups = {"functional"})
+@Test(groups = {"functional"}, enabled = false) // this has always been disabled since 1.4.x. See JBCACHE-315
public class ForcedStateTransferTest extends StateTransferTestBase
{
/**
16 years, 6 months