[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/options ...
Manik Surtani
msurtani at jboss.com
Wed Dec 6 11:28:37 EST 2006
User: msurtani
Date: 06/12/06 11:28:37
Modified: tests/functional/org/jboss/cache/options
ExplicitVersionsReplTest.java
Log:
JBCACHE-894
Revision Changes Path
1.4 +20 -8 JBossCache/tests/functional/org/jboss/cache/options/ExplicitVersionsReplTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ExplicitVersionsReplTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/options/ExplicitVersionsReplTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- ExplicitVersionsReplTest.java 16 Nov 2006 14:37:09 -0000 1.3
+++ ExplicitVersionsReplTest.java 6 Dec 2006 16:28:37 -0000 1.4
@@ -42,8 +42,8 @@
// give us lots of time to trace and debug shit
c.setSyncCommitPhase(true);
c.setSyncRollbackPhase(true);
- c.setSyncReplTimeout(600000);
- c.setLockAcquisitionTimeout(600000);
+ c.setSyncReplTimeout(1000);
+ c.setLockAcquisitionTimeout(1000);
c.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
cache.setConfiguration(c);
@@ -83,7 +83,7 @@
{
DataVersion version = new TestVersion("99");
cache[0].getInvocationContext().getOptionOverrides().setDataVersion(version);
- cache[0].put(fqn, key, "value"); // TestVersion-99 should be on both caches now
+ cache[0].put(fqn, key, "value");// TestVersion-99 should be on both caches now
TransactionManager mgr = cache[0].getTransactionManager();
mgr.begin();
@@ -120,7 +120,7 @@
{
DataVersion version = new TestVersion("99");
cache[0].getInvocationContext().getOptionOverrides().setDataVersion(version);
- cache[0].put(fqn, key, "value"); // TestVersion-99 should be on both caches now
+ cache[0].put(fqn, key, "value");// TestVersion-99 should be on both caches now
TransactionManager mgr = cache[0].getTransactionManager();
mgr.begin();
@@ -142,7 +142,7 @@
{
DataVersion version = new TestVersion("99");
cache[0].getInvocationContext().getOptionOverrides().setDataVersion(version);
- cache[0].put(fqn, key, "value"); // TestVersion-99 should be on both caches now
+ cache[0].put(fqn, key, "value");// TestVersion-99 should be on both caches now
TransactionManager mgr = cache[0].getTransactionManager();
mgr.begin();
@@ -171,7 +171,7 @@
*/
public void testIncompatibleVersionTypes2() throws Exception
{
- cache[0].put(fqn, key, "value"); // default data version should be on both caches now
+ cache[0].put(fqn, key, "value");// default data version should be on both caches now
TransactionManager mgr = cache[0].getTransactionManager();
mgr.begin();
@@ -201,7 +201,7 @@
*/
public void testCompatibleVersionTypes2() throws Exception
{
- cache[0].put(fqn, key, "value"); // TestVersion-99 should be on both caches now
+ cache[0].put(fqn, key, "value");// TestVersion-99 should be on both caches now
TransactionManager mgr = cache[0].getTransactionManager();
mgr.begin();
@@ -223,7 +223,7 @@
{
DataVersion version = new DefaultDataVersion(200);
cache[0].getInvocationContext().getOptionOverrides().setDataVersion(version);
- cache[0].put(fqn, key, "value"); // TestVersion-99 should be on both caches now
+ cache[0].put(fqn, key, "value");// TestVersion-99 should be on both caches now
TransactionManager mgr = cache[0].getTransactionManager();
mgr.begin();
@@ -286,5 +286,17 @@
assertEquals(expected, ((OptimisticTreeNode) cache[1].get(fqn)).getVersion());
}
+ public void testExplicitVersionOnRoot() throws Exception
+ {
+ TestVersion newVersion = new TestVersion("100");
+
+ cache[0].getInvocationContext().getOptionOverrides().setDataVersion(newVersion);
+ cache[0].getTransactionManager().begin();
+ cache[0].put(Fqn.ROOT, "k", "v");
+
+ // should not barf
+ cache[0].getTransactionManager().commit();
+ }
+
}
More information about the jboss-cvs-commits
mailing list