Author: manik.surtani(a)jboss.com
Date: 2008-06-25 11:10:47 -0400 (Wed, 25 Jun 2008)
New Revision: 6037
Modified:
core/trunk/src/test/java/org/jboss/cache/optimistic/CacheTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/OptimisticReplicationInterceptorTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/TxInterceptorTest.java
core/trunk/src/test/java/org/jboss/cache/optimistic/ValidatorInterceptorTest.java
Log:
Removed unnecessary param
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/CacheTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/CacheTest.java 2008-06-25 15:09:36
UTC (rev 6036)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/CacheTest.java 2008-06-25 15:10:47
UTC (rev 6037)
@@ -10,7 +10,6 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.NodeSPI;
import org.jboss.cache.VersionedNode;
-import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.commands.ReversibleCommand;
import org.jboss.cache.commands.tx.CommitCommand;
import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
@@ -20,6 +19,7 @@
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import org.jboss.cache.transaction.TransactionTable;
+import org.jboss.cache.util.TestingUtil;
import org.jgroups.Address;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
@@ -30,7 +30,6 @@
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
import java.util.List;
-import java.util.Map;
import java.util.concurrent.CountDownLatch;
@@ -98,7 +97,7 @@
try
{
latch.await();
- for (int i=0;i<5; i++)
+ for (int i = 0; i < 5; i++)
{
c.put("/a", "k", "v");
}
@@ -226,7 +225,7 @@
//call our remote method
List<ReversibleCommand> cacheCommands =
injectDataVersion(entry.getModifications());
- OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(remoteGtx,
cacheCommands, (Map) null, (Address) remoteGtx.getAddress(), false);
+ OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(remoteGtx,
cacheCommands, (Address) remoteGtx.getAddress(), false);
TestingUtil.replicateCommand(c, prepareCommand);
Modified:
core/trunk/src/test/java/org/jboss/cache/optimistic/OptimisticReplicationInterceptorTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/optimistic/OptimisticReplicationInterceptorTest.java 2008-06-25
15:09:36 UTC (rev 6036)
+++
core/trunk/src/test/java/org/jboss/cache/optimistic/OptimisticReplicationInterceptorTest.java 2008-06-25
15:10:47 UTC (rev 6037)
@@ -7,7 +7,6 @@
package org.jboss.cache.optimistic;
import org.jboss.cache.CacheSPI;
-import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.commands.ReversibleCommand;
import org.jboss.cache.commands.tx.CommitCommand;
import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
@@ -18,6 +17,7 @@
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import org.jboss.cache.transaction.TransactionTable;
+import org.jboss.cache.util.TestingUtil;
import org.jgroups.Address;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
@@ -33,7 +33,6 @@
import java.io.ObjectOutput;
import java.util.ArrayList;
import java.util.List;
-import java.util.Map;
/**
* @author xenephon
@@ -147,7 +146,7 @@
command.setGlobalTransaction(remoteGtx);
//call our remote method
- OptimisticPrepareCommand optimisticPrepareCommand = new
OptimisticPrepareCommand(remoteGtx, null, (Map) null, (Address) remoteGtx.getAddress(),
false);
+ OptimisticPrepareCommand optimisticPrepareCommand = new
OptimisticPrepareCommand(remoteGtx, null, (Address) remoteGtx.getAddress(), false);
try
{
TestingUtil.replicateCommand(cache, optimisticPrepareCommand);
//getInvocationDelegate(cache)._replicate(prepareMethod);
@@ -211,7 +210,7 @@
ReversibleCommand command = entry.getModifications().get(0);
command.setGlobalTransaction(remoteGtx);
//call our remote method
- OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(remoteGtx,
null, null, (Address) remoteGtx.getAddress(), false);
+ OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(remoteGtx,
null, (Address) remoteGtx.getAddress(), false);
try
{
TestingUtil.replicateCommand(cache, prepareCommand);
@@ -400,7 +399,7 @@
//hack the method call to make it have the remote globalTransaction
ReversibleCommand command = entry.getModifications().get(0);
command.setGlobalTransaction(remoteGtx);
- OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(remoteGtx,
null, (Map) null, (Address) remoteGtx.getAddress(), false);
+ OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(remoteGtx,
null, (Address) remoteGtx.getAddress(), false);
try
{
TestingUtil.replicateCommand(cache, prepareCommand);
Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/TxInterceptorTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/TxInterceptorTest.java 2008-06-25
15:09:36 UTC (rev 6036)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/TxInterceptorTest.java 2008-06-25
15:10:47 UTC (rev 6037)
@@ -7,7 +7,6 @@
package org.jboss.cache.optimistic;
import org.jboss.cache.CacheSPI;
-import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.commands.ReversibleCommand;
import org.jboss.cache.commands.tx.CommitCommand;
import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
@@ -17,6 +16,7 @@
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import org.jboss.cache.transaction.TransactionSetup;
import org.jboss.cache.transaction.TransactionTable;
+import org.jboss.cache.util.TestingUtil;
import org.jgroups.Address;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.Test;
@@ -24,7 +24,6 @@
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
import java.util.List;
-import java.util.Map;
@Test(groups = {"functional", "transaction"})
public class TxInterceptorTest extends AbstractOptimisticTestCase
@@ -309,7 +308,7 @@
command.setGlobalTransaction(remoteGtx);
//call our remote method
- OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(remoteGtx,
injectDataVersion(entry.getModifications()), null, (Address) remoteGtx.getAddress(),
Boolean.FALSE);
+ OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(remoteGtx,
injectDataVersion(entry.getModifications()), (Address) remoteGtx.getAddress(),
Boolean.FALSE);
try
{
TestingUtil.replicateCommand(cache, prepareCommand);
@@ -368,7 +367,7 @@
ReversibleCommand command = entry.getModifications().get(0);
command.setGlobalTransaction(remoteGtx);
//call our remote method
- OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(remoteGtx,
injectDataVersion(entry.getModifications()), null, (Address) remoteGtx.getAddress(),
Boolean.FALSE);
+ OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(remoteGtx,
injectDataVersion(entry.getModifications()), (Address) remoteGtx.getAddress(),
Boolean.FALSE);
try
{
TestingUtil.replicateCommand(cache, prepareCommand);
@@ -451,7 +450,7 @@
ReversibleCommand command = entry.getModifications().get(0);
command.setGlobalTransaction(remoteGtx);
//call our remote method
- OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(remoteGtx,
injectDataVersion(entry.getModifications()), (Map) null, (Address) remoteGtx.getAddress(),
Boolean.FALSE);
+ OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(remoteGtx,
injectDataVersion(entry.getModifications()), (Address) remoteGtx.getAddress(),
Boolean.FALSE);
try
{
TestingUtil.replicateCommand(cache, prepareCommand);
@@ -539,7 +538,7 @@
ReversibleCommand command = entry.getModifications().get(0);
command.setGlobalTransaction(remoteGtx);
//call our remote method
- OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(remoteGtx,
injectDataVersion(entry.getModifications()), (Map) null, (Address) remoteGtx.getAddress(),
Boolean.FALSE);
+ OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(remoteGtx,
injectDataVersion(entry.getModifications()), (Address) remoteGtx.getAddress(),
Boolean.FALSE);
try
{
TestingUtil.replicateCommand(cache, prepareCommand);
@@ -638,7 +637,7 @@
command.setGlobalTransaction(remoteGtx);
//call our remote method
- OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(remoteGtx,
injectDataVersion(entry.getModifications()), (Map) null, (Address) remoteGtx.getAddress(),
Boolean.FALSE);
+ OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(remoteGtx,
injectDataVersion(entry.getModifications()), (Address) remoteGtx.getAddress(),
Boolean.FALSE);
try
{
TestingUtil.replicateCommand(cache, prepareCommand);
@@ -722,7 +721,7 @@
command.setGlobalTransaction(remoteGtx);
//call our remote method
- OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(remoteGtx,
injectDataVersion(entry.getModifications()), (Map) null, (Address) remoteGtx.getAddress(),
Boolean.FALSE);
+ OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(remoteGtx,
injectDataVersion(entry.getModifications()), (Address) remoteGtx.getAddress(),
Boolean.FALSE);
try
{
TestingUtil.replicateCommand(cache, prepareCommand);
Modified:
core/trunk/src/test/java/org/jboss/cache/optimistic/ValidatorInterceptorTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/optimistic/ValidatorInterceptorTest.java 2008-06-25
15:09:36 UTC (rev 6036)
+++
core/trunk/src/test/java/org/jboss/cache/optimistic/ValidatorInterceptorTest.java 2008-06-25
15:10:47 UTC (rev 6037)
@@ -20,11 +20,11 @@
import org.jboss.cache.interceptors.OptimisticValidatorInterceptor;
import org.jboss.cache.interceptors.base.CommandInterceptor;
import org.jboss.cache.loader.SamplePojo;
-import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import org.jboss.cache.transaction.TransactionTable;
import org.jboss.cache.util.CachePrinter;
+import org.jboss.cache.util.TestingUtil;
import org.jgroups.Address;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
@@ -108,7 +108,7 @@
assertTrue(!cache.exists("/one/two"));
assertEquals(null, dummy.getCalledCommand());
- OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(gtx,
entry.getModifications(), (Map) null, (Address) gtx.getAddress(), Boolean.FALSE);
+ OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(gtx,
entry.getModifications(), (Address) gtx.getAddress(), Boolean.FALSE);
//now let us do a prepare
TestingUtil.replicateCommand(cache, prepareCommand);
@@ -161,7 +161,7 @@
//lets change one of the underlying version numbers
workspace.getNode(Fqn.fromString("/one/two")).getNode().setVersion(new
DefaultDataVersion(2));
//now let us do a prepare
- OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(gtx,
entry.getModifications(), (Map) null, (Address) gtx.getAddress(), Boolean.FALSE);
+ OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(gtx,
entry.getModifications(), (Address) gtx.getAddress(), Boolean.FALSE);
try
{
TestingUtil.replicateCommand(cache, prepareCommand);
@@ -208,7 +208,7 @@
//lets change one of the underlying version numbers
//now let us do a prepare
- OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(gtx,
entry.getModifications(), (Map) null, (Address) gtx.getAddress(), Boolean.FALSE);
+ OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(gtx,
entry.getModifications(), (Address) gtx.getAddress(), Boolean.FALSE);
try
{
TestingUtil.replicateCommand(cache, prepareCommand);
@@ -285,7 +285,7 @@
//lets change one of the underlying version numbers
//now let us do a prepare
- OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(gtx,
entry.getModifications(), (Map) null, (Address) gtx.getAddress(), Boolean.FALSE);
+ OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(gtx,
entry.getModifications(), (Address) gtx.getAddress(), Boolean.FALSE);
try
{
TestingUtil.replicateCommand(cache, prepareCommand);
@@ -364,7 +364,7 @@
//lets change one of the underlying version numbers
//now let us do a prepare
- OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(gtx,
entry.getModifications(), (Map) null, (Address) gtx.getAddress(), Boolean.FALSE);
+ OptimisticPrepareCommand prepareCommand = new OptimisticPrepareCommand(gtx,
entry.getModifications(), (Address) gtx.getAddress(), Boolean.FALSE);
try
{