[jbosscache-commits] JBoss Cache SVN: r6165 - core/trunk/src/test/java/org/jboss/cache/marshall.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Thu Jul 3 15:58:16 EDT 2008


Author: manik.surtani at jboss.com
Date: 2008-07-03 15:58:15 -0400 (Thu, 03 Jul 2008)
New Revision: 6165

Modified:
   core/trunk/src/test/java/org/jboss/cache/marshall/AsyncReplTest.java
   core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshallerTestBase.java
Log:
Updated to deal with legacy commands

Modified: core/trunk/src/test/java/org/jboss/cache/marshall/AsyncReplTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/AsyncReplTest.java	2008-07-03 19:57:53 UTC (rev 6164)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/AsyncReplTest.java	2008-07-03 19:58:15 UTC (rev 6165)
@@ -13,7 +13,7 @@
 import org.jboss.cache.DefaultCacheFactory;
 import org.jboss.cache.Fqn;
 import org.jboss.cache.Region;
-import org.jboss.cache.commands.write.PutKeyValueCommand;
+import org.jboss.cache.commands.legacy.write.PessPutKeyValueCommand;
 import org.jboss.cache.config.Configuration.CacheMode;
 import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
 import org.jboss.cache.marshall.data.Address;
@@ -25,7 +25,13 @@
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
-import javax.transaction.*;
+import javax.transaction.HeuristicMixedException;
+import javax.transaction.HeuristicRollbackException;
+import javax.transaction.NotSupportedException;
+import javax.transaction.RollbackException;
+import javax.transaction.SystemException;
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
 import java.lang.reflect.Method;
 
 /**
@@ -109,11 +115,11 @@
       }
 
       if (useMarshalledValues) Thread.currentThread().setContextClassLoader(cla);
-      replListener2.expect(PutKeyValueCommand.class);
+      replListener2.expect(PessPutKeyValueCommand.class);
       cache1.put(aop, "person", ben);
       replListener2.waitForReplicationToOccur(500);
 
-      replListener2.expect(PutKeyValueCommand.class);
+      replListener2.expect(PessPutKeyValueCommand.class);
       cache1.put(Fqn.fromString("/alias"), "person", ben);
       replListener2.waitForReplicationToOccur(500);
 
@@ -138,7 +144,7 @@
       // Set it back to the cache
       // Can't cast it to Person. CCE will resutl.
       if (useMarshalledValues) Thread.currentThread().setContextClassLoader(clb);
-      replListener1.expect(PutKeyValueCommand.class);
+      replListener1.expect(PessPutKeyValueCommand.class);
       cache2.put(aop, "person", ben2);
       replListener1.waitForReplicationToOccur(1000);
       if (useMarshalledValues) resetContextClassLoader();
@@ -168,14 +174,14 @@
 
       if (useMarshalledValues) Thread.currentThread().setContextClassLoader(cla);
 
-      replListener2.expect(PutKeyValueCommand.class);
+      replListener2.expect(PessPutKeyValueCommand.class);
       cache1.put(Fqn.fromString("/aop/1"), "person", ben);
       replListener2.waitForReplicationToOccur(1000);
 
-      replListener2.expect(PutKeyValueCommand.class);
+      replListener2.expect(PessPutKeyValueCommand.class);
       cache1.put(Fqn.fromString("/aop/2"), "person", scopedBen1);
       replListener2.waitForReplicationToOccur(1000);
-      
+
       if (useMarshalledValues) resetContextClassLoader();
 
       Object ben2 = null;

Modified: core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshallerTestBase.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshallerTestBase.java	2008-07-03 19:57:53 UTC (rev 6164)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/CacheMarshallerTestBase.java	2008-07-03 19:58:15 UTC (rev 6165)
@@ -9,8 +9,8 @@
 import org.jboss.cache.Fqn;
 import org.jboss.cache.RegionManager;
 import org.jboss.cache.commands.ReplicableCommand;
+import org.jboss.cache.commands.legacy.write.PessPutKeyValueCommand;
 import org.jboss.cache.commands.remote.ReplicateCommand;
-import org.jboss.cache.commands.write.PutKeyValueCommand;
 import org.jboss.cache.config.Configuration;
 import org.jboss.cache.factories.ComponentRegistry;
 import org.jboss.cache.invocation.CacheInvocationDelegate;
@@ -112,7 +112,7 @@
    public void testMethodCall() throws Exception
    {
       Fqn fqn = Fqn.fromElements(3, false);
-      ReplicableCommand cmd = new PutKeyValueCommand(null, fqn, "key", "value");
+      ReplicableCommand cmd = new PessPutKeyValueCommand(null, fqn, "key", "value");
       byte[] asBytes = marshaller.objectToByteBuffer(cmd);
       Object o2 = marshaller.objectFromByteBuffer(asBytes);
 
@@ -125,7 +125,7 @@
    public void testNestedMethodCall() throws Exception
    {
       Fqn fqn = Fqn.fromElements(3, false);
-      ReplicableCommand cmd = new PutKeyValueCommand(null, fqn, "key", "value");
+      ReplicableCommand cmd = new PessPutKeyValueCommand(null, fqn, "key", "value");
       ReplicableCommand replicateCmd = new ReplicateCommand(cmd);
       byte[] asBytes = marshaller.objectToByteBuffer(replicateCmd);
       Object o2 = marshaller.objectFromByteBuffer(asBytes);
@@ -215,12 +215,12 @@
       Fqn f = Fqn.fromElements("BlahBlah", 3, false);
       String k = "key", v = "value";
 
-      ReplicableCommand cmd = new PutKeyValueCommand(null, f, k, v);
+      ReplicableCommand cmd = new PessPutKeyValueCommand(null, f, k, v);
       ReplicableCommand replCmd = new ReplicateCommand(cmd);
 
       calls.add(replCmd);
 
-      cmd = new PutKeyValueCommand(null, f, k, v);
+      cmd = new PessPutKeyValueCommand(null, f, k, v);
       replCmd = new ReplicateCommand(cmd);
 
       calls.add(replCmd);




More information about the jbosscache-commits mailing list