Fixing byteman tests after the rename
This commit is contained in:
parent
63152b1d4b
commit
70a6e43075
|
@ -16,6 +16,18 @@
|
|||
*/
|
||||
package org.apache.activemq.artemis.tests.extras.byteman;
|
||||
|
||||
import javax.jms.Message;
|
||||
import javax.resource.ResourceException;
|
||||
import javax.transaction.SystemException;
|
||||
import javax.transaction.Transaction;
|
||||
import javax.transaction.TransactionManager;
|
||||
import javax.transaction.xa.XAException;
|
||||
import javax.transaction.xa.XAResource;
|
||||
import javax.transaction.xa.Xid;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.arjuna.ats.arjuna.coordinator.TransactionReaper;
|
||||
import com.arjuna.ats.arjuna.coordinator.TxControl;
|
||||
import com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple;
|
||||
|
@ -38,18 +50,6 @@ import org.junit.Before;
|
|||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import javax.jms.Message;
|
||||
import javax.resource.ResourceException;
|
||||
import javax.transaction.SystemException;
|
||||
import javax.transaction.Transaction;
|
||||
import javax.transaction.TransactionManager;
|
||||
import javax.transaction.xa.XAException;
|
||||
import javax.transaction.xa.XAResource;
|
||||
import javax.transaction.xa.Xid;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@RunWith(BMUnitRunner.class)
|
||||
public class ActiveMQMessageHandlerTest extends ActiveMQRATestBase
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ public class ActiveMQMessageHandlerTest extends ActiveMQRATestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext",
|
||||
targetMethod = "xaEnd",
|
||||
targetLocation = "ENTRY",
|
||||
action = "org.apache.activemq.tests.extras.byteman.ActiveMQMessageHandlerTest.interrupt();"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.ActiveMQMessageHandlerTest.interrupt();"
|
||||
)
|
||||
}
|
||||
)
|
||||
|
@ -154,7 +154,7 @@ public class ActiveMQMessageHandlerTest extends ActiveMQRATestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext",
|
||||
targetMethod = "xaEnd",
|
||||
targetLocation = "ENTRY",
|
||||
action = "org.apache.activemq.tests.extras.byteman.ActiveMQMessageHandlerTest.interrupt();"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.ActiveMQMessageHandlerTest.interrupt();"
|
||||
)
|
||||
}
|
||||
)
|
||||
|
|
|
@ -111,7 +111,7 @@ public class BMFailoverTest extends FailoverTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext",
|
||||
targetMethod = "xaEnd",
|
||||
targetLocation = "AT EXIT",
|
||||
action = "org.apache.activemq.tests.extras.byteman.BMFailoverTest.stopAndThrow()"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.BMFailoverTest.stopAndThrow()"
|
||||
)
|
||||
}
|
||||
)
|
||||
|
@ -202,7 +202,7 @@ public class BMFailoverTest extends FailoverTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.client.impl.ClientSessionImpl",
|
||||
targetMethod = "start(javax.transaction.xa.Xid, int)",
|
||||
targetLocation = "AT EXIT",
|
||||
action = "org.apache.activemq.tests.extras.byteman.BMFailoverTest.serverToStop.getServer().stop(true)"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.BMFailoverTest.serverToStop.getServer().stop(true)"
|
||||
)
|
||||
}
|
||||
)
|
||||
|
@ -305,7 +305,7 @@ public class BMFailoverTest extends FailoverTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.client.impl.ClientSessionImpl",
|
||||
targetMethod = "commit",
|
||||
targetLocation = "ENTRY",
|
||||
action = "org.apache.activemq.tests.extras.byteman.BMFailoverTest.serverToStop.getServer().stop(true)"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.BMFailoverTest.serverToStop.getServer().stop(true)"
|
||||
)
|
||||
}
|
||||
)
|
||||
|
@ -346,7 +346,7 @@ public class BMFailoverTest extends FailoverTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.client.impl.ClientSessionImpl",
|
||||
targetMethod = "commit",
|
||||
targetLocation = "ENTRY",
|
||||
action = "org.apache.activemq.tests.extras.byteman.BMFailoverTest.serverToStop.getServer().stop(true)"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.BMFailoverTest.serverToStop.getServer().stop(true)"
|
||||
)
|
||||
}
|
||||
)
|
||||
|
|
|
@ -57,7 +57,7 @@ public class BridgeServerLocatorConfigurationTest extends ServiceTestBase
|
|||
|
||||
@Test
|
||||
@BMRule(name = "check connection ttl",
|
||||
targetClass = "org.apache.activemq.tests.extras.byteman.BridgeServerLocatorConfigurationTest",
|
||||
targetClass = "org.apache.activemq.artemis.tests.extras.byteman.BridgeServerLocatorConfigurationTest",
|
||||
targetMethod = "getBridgeTTL(ActiveMQServer, String)", targetLocation = "EXIT",
|
||||
action = "$! = $0.getConfiguredBridge($1).serverLocator.getConnectionTTL();")
|
||||
/**
|
||||
|
|
|
@ -128,7 +128,7 @@ public class ClosingConnectionTest extends ServiceTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.journal.impl.NIOSequentialFile",
|
||||
targetMethod = "open(int, boolean)",
|
||||
targetLocation = "AT INVOKE java.nio.channels.FileChannel.size()",
|
||||
action = "org.apache.activemq.tests.extras.byteman.ClosingConnectionTest.killConnection();"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.ClosingConnectionTest.killConnection();"
|
||||
|
||||
)
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ public class ClusteredGroupingTest extends ClusterTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.server.group.impl.LocalGroupingHandler",
|
||||
targetMethod = "removeGrouping",
|
||||
targetLocation = "ENTRY",
|
||||
action = "org.apache.activemq.tests.extras.byteman.ClusteredGroupingTest.pause($1);"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.ClusteredGroupingTest.pause($1);"
|
||||
),
|
||||
@BMRule
|
||||
(
|
||||
|
@ -59,7 +59,7 @@ public class ClusteredGroupingTest extends ClusterTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.server.group.impl.GroupHandlingAbstract",
|
||||
targetMethod = "forceRemove",
|
||||
targetLocation = "ENTRY",
|
||||
action = "org.apache.activemq.tests.extras.byteman.ClusteredGroupingTest.restart2();"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.ClusteredGroupingTest.restart2();"
|
||||
)
|
||||
}
|
||||
)
|
||||
|
@ -128,13 +128,13 @@ public class ClusteredGroupingTest extends ClusterTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.server.group.impl.RemoteGroupingHandler",
|
||||
targetMethod = "onNotification",
|
||||
targetLocation = "ENTRY",
|
||||
action = "org.apache.activemq.tests.extras.byteman.ClusteredGroupingTest.pause2($1);"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.ClusteredGroupingTest.pause2($1);"
|
||||
),
|
||||
@BMRule(name = "blow-up2",
|
||||
targetClass = "org.apache.activemq.artemis.core.server.group.impl.RemoteGroupingHandler",
|
||||
targetMethod = "remove",
|
||||
targetLocation = "ENTRY",
|
||||
action = "org.apache.activemq.tests.extras.byteman.ClusteredGroupingTest.restart2();")
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.ClusteredGroupingTest.restart2();")
|
||||
}
|
||||
)
|
||||
public void test3serversLocalGoesDown() throws Exception
|
||||
|
@ -213,13 +213,13 @@ public class ClusteredGroupingTest extends ClusterTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.server.group.impl.LocalGroupingHandler",
|
||||
targetMethod = "onNotification",
|
||||
targetLocation = "ENTRY",
|
||||
action = "org.apache.activemq.tests.extras.byteman.ClusteredGroupingTest.pause2($1);"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.ClusteredGroupingTest.pause2($1);"
|
||||
),
|
||||
@BMRule(name = "blow-up2",
|
||||
targetClass = "org.apache.activemq.artemis.core.server.group.impl.LocalGroupingHandler",
|
||||
targetMethod = "remove",
|
||||
targetLocation = "ENTRY",
|
||||
action = "org.apache.activemq.tests.extras.byteman.ClusteredGroupingTest.restart2();")
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.ClusteredGroupingTest.restart2();")
|
||||
}
|
||||
)
|
||||
public void testLocal3serversLocalGoesDown() throws Exception
|
||||
|
@ -298,13 +298,13 @@ public class ClusteredGroupingTest extends ClusterTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.server.group.impl.LocalGroupingHandler",
|
||||
targetMethod = "onNotification",
|
||||
targetLocation = "ENTRY",
|
||||
action = "org.apache.activemq.tests.extras.byteman.ClusteredGroupingTest.pause2($1);"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.ClusteredGroupingTest.pause2($1);"
|
||||
),
|
||||
@BMRule(name = "blow-up2",
|
||||
targetClass = "org.apache.activemq.artemis.core.server.group.impl.LocalGroupingHandler",
|
||||
targetMethod = "remove",
|
||||
targetLocation = "ENTRY",
|
||||
action = "org.apache.activemq.tests.extras.byteman.ClusteredGroupingTest.restart2();")
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.ClusteredGroupingTest.restart2();")
|
||||
}
|
||||
)
|
||||
public void testLocal4serversLocalGoesDown() throws Exception
|
||||
|
|
|
@ -79,7 +79,7 @@ public class GroupingTest extends JMSTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.server.impl.ServerSessionImpl",
|
||||
targetMethod = "rollback",
|
||||
targetLocation = "EXIT",
|
||||
action = "org.apache.activemq.tests.extras.byteman.GroupingTest.pause();"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.GroupingTest.pause();"
|
||||
)
|
||||
}
|
||||
)
|
||||
|
|
|
@ -35,7 +35,7 @@ import org.junit.runner.RunWith;
|
|||
@BMRules(rules = { @BMRule(name = "modify map during iteration",
|
||||
targetClass = "org.apache.activemq.artemis.core.settings.impl.HierarchicalObjectRepository",
|
||||
targetMethod = "getPossibleMatches(String)", targetLocation = "AT INVOKE java.util.HashMap.put",
|
||||
action = "org.apache.activemq.tests.extras.byteman.HierarchicalObjectRepositoryTest.bum()"), })
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.HierarchicalObjectRepositoryTest.bum()"), })
|
||||
public class HierarchicalObjectRepositoryTest
|
||||
{
|
||||
private static final String A = "a.";
|
||||
|
|
|
@ -49,7 +49,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl",
|
||||
targetMethod = "send",
|
||||
targetLocation = "ENTRY",
|
||||
action = "org.apache.activemq.tests.extras.byteman.JMSBridgeReconnectionTest.pause($1);"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.JMSBridgeReconnectionTest.pause($1);"
|
||||
),
|
||||
@BMRule
|
||||
(
|
||||
|
@ -57,7 +57,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.client.impl.ClientProducerImpl",
|
||||
targetMethod = "sendRegularMessage",
|
||||
targetLocation = "ENTRY",
|
||||
action = "org.apache.activemq.tests.extras.byteman.JMSBridgeReconnectionTest.pause2($1,$2,$3);"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.JMSBridgeReconnectionTest.pause2($1,$2,$3);"
|
||||
)
|
||||
}
|
||||
)
|
||||
|
|
|
@ -68,7 +68,7 @@ public class MessageCopyTest
|
|||
),
|
||||
@BMRule(
|
||||
name = "JMSServer.stop wait-init",
|
||||
targetClass = "org.apache.activemq.tests.extras.byteman.MessageCopyTest",
|
||||
targetClass = "org.apache.activemq.artemis.tests.extras.byteman.MessageCopyTest",
|
||||
targetMethod = "simulateRead",
|
||||
targetLocation = "EXIT",
|
||||
action = "signalWake(\"finish-read\", true)"
|
||||
|
|
|
@ -129,7 +129,7 @@ public class OrphanedConsumerTest extends ServiceTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl",
|
||||
targetMethod = "close",
|
||||
targetLocation = "AT EXIT",
|
||||
condition = "org.apache.activemq.tests.extras.byteman.OrphanedConsumerTest.isConditionActive()",
|
||||
condition = "org.apache.activemq.artemis.tests.extras.byteman.OrphanedConsumerTest.isConditionActive()",
|
||||
action = "System.out.println(\"throwing stuff\");throw new InterruptedException()"
|
||||
),
|
||||
@BMRule
|
||||
|
@ -138,8 +138,8 @@ public class OrphanedConsumerTest extends ServiceTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl",
|
||||
targetMethod = "close",
|
||||
targetLocation = "ENTRY",
|
||||
condition = "org.apache.activemq.tests.extras.byteman.OrphanedConsumerTest.isConditionActive()",
|
||||
action = "org.apache.activemq.tests.extras.byteman.OrphanedConsumerTest.leavingCloseOnTestCountersWhileClosing()"
|
||||
condition = "org.apache.activemq.artemis.tests.extras.byteman.OrphanedConsumerTest.isConditionActive()",
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.OrphanedConsumerTest.leavingCloseOnTestCountersWhileClosing()"
|
||||
)
|
||||
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ public class OrphanedConsumerTest extends ServiceTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl",
|
||||
targetMethod = "close",
|
||||
targetLocation = "AT EXIT",
|
||||
condition = "org.apache.activemq.tests.extras.byteman.OrphanedConsumerTest.isConditionActive()",
|
||||
condition = "org.apache.activemq.artemis.tests.extras.byteman.OrphanedConsumerTest.isConditionActive()",
|
||||
action = "System.out.println(\"throwing stuff\");throw new InterruptedException()"
|
||||
),
|
||||
@BMRule
|
||||
|
@ -177,8 +177,8 @@ public class OrphanedConsumerTest extends ServiceTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl",
|
||||
targetMethod = "close",
|
||||
targetLocation = "ENTRY",
|
||||
condition = "org.apache.activemq.tests.extras.byteman.OrphanedConsumerTest.isConditionActive()",
|
||||
action = "org.apache.activemq.tests.extras.byteman.OrphanedConsumerTest.leavingCloseOnTestCountersWhileClosing()"
|
||||
condition = "org.apache.activemq.artemis.tests.extras.byteman.OrphanedConsumerTest.isConditionActive()",
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.OrphanedConsumerTest.leavingCloseOnTestCountersWhileClosing()"
|
||||
)
|
||||
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ public class PagingLeakTest extends ServiceTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.paging.cursor.impl.PagePositionImpl",
|
||||
targetMethod = "<init>()",
|
||||
targetLocation = "ENTRY",
|
||||
action = "org.apache.activemq.tests.extras.byteman.PagingLeakTest.newPosition()"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.PagingLeakTest.newPosition()"
|
||||
),
|
||||
@BMRule
|
||||
(
|
||||
|
@ -84,7 +84,7 @@ public class PagingLeakTest extends ServiceTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.paging.cursor.impl.PagePositionImpl",
|
||||
targetMethod = "finalize",
|
||||
targetLocation = "ENTRY",
|
||||
action = "org.apache.activemq.tests.extras.byteman.PagingLeakTest.deletePosition()"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.PagingLeakTest.deletePosition()"
|
||||
)
|
||||
}
|
||||
)
|
||||
|
|
|
@ -53,7 +53,7 @@ public class ReplicationBackupTest extends ServiceTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.server.impl.SharedNothingLiveActivation",
|
||||
targetMethod = "run",
|
||||
targetLocation = "AT EXIT",
|
||||
action = "org.apache.activemq.tests.extras.byteman.ReplicationBackupTest.breakIt();"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.ReplicationBackupTest.breakIt();"
|
||||
)
|
||||
}
|
||||
)
|
||||
|
|
|
@ -104,7 +104,7 @@ public class ScaleDownFailoverTest extends ClusterTestBase
|
|||
targetMethod = "createSessionFactory(org.apache.activemq.artemis.api.core.TransportConfiguration, int, boolean)",
|
||||
isInterface = true,
|
||||
targetLocation = "ENTRY",
|
||||
action = "org.apache.activemq.tests.extras.byteman.ScaleDownFailoverTest.fail($1);"
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.ScaleDownFailoverTest.fail($1);"
|
||||
)
|
||||
public void testScaleDownWhenFirstServerFails() throws Exception
|
||||
{
|
||||
|
|
|
@ -69,7 +69,7 @@ public class StartStopDeadlockTest extends ServiceTestBase
|
|||
),
|
||||
@BMRule(
|
||||
name = "StartStopDeadlockTest tearDown",
|
||||
targetClass = "org.apache.activemq.tests.extras.byteman.StartStopDeadlockTest",
|
||||
targetClass = "org.apache.activemq.artemis.tests.extras.byteman.StartStopDeadlockTest",
|
||||
targetMethod = "tearDown",
|
||||
targetLocation = "ENTRY",
|
||||
action = "deleteCounter(\"server-Init\")"
|
||||
|
|
|
@ -61,7 +61,7 @@ public class StompInternalStateTest extends ServiceTestBase
|
|||
targetClass = "org.apache.activemq.artemis.core.protocol.stomp.StompProtocolManager",
|
||||
targetMethod = "onNotification(org.apache.activemq.artemis.core.server.management.Notification)",
|
||||
targetLocation = "EXIT",
|
||||
helper = "org.apache.activemq.tests.extras.byteman.StompInternalStateTest",
|
||||
helper = "org.apache.activemq.artemis.tests.extras.byteman.StompInternalStateTest",
|
||||
action = "verifyBindingAddRemove($1, $0.destinations)"
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue