NO-JIRA Fix invalid log path in BMRules
This commit is contained in:
parent
cee2c52f7c
commit
053cfbc102
|
@ -24,11 +24,17 @@ import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
|
|||
import org.jboss.byteman.contrib.bmunit.BMRule;
|
||||
import org.jboss.byteman.contrib.bmunit.BMRules;
|
||||
import org.jboss.byteman.contrib.bmunit.BMUnitRunner;
|
||||
import org.jboss.logging.Logger;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@RunWith(BMUnitRunner.class)
|
||||
public class LatencyTest extends ActiveMQTestBase {
|
||||
private static final Logger log = Logger.getLogger(LatencyTest.class);
|
||||
|
||||
private static void debugLog(String message) {
|
||||
log.debug(message);
|
||||
}
|
||||
|
||||
/*
|
||||
* simple test to make sure connect still works with some network latency built into netty
|
||||
|
@ -40,7 +46,7 @@ public class LatencyTest extends ActiveMQTestBase {
|
|||
targetClass = "org.jboss.netty.bootstrap.ClientBootstrap",
|
||||
targetMethod = "connect",
|
||||
targetLocation = "ENTRY",
|
||||
action = "log.debug(\"netty connecting\")"), @BMRule(
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.LatencyTest.debugLog(\"netty connecting\")"), @BMRule(
|
||||
name = "sleep OioWorker.run",
|
||||
targetClass = "org.jboss.netty.channel.socket.oio.OioWorker",
|
||||
targetMethod = "run",
|
||||
|
|
|
@ -30,6 +30,7 @@ import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
|
|||
import org.jboss.byteman.contrib.bmunit.BMRule;
|
||||
import org.jboss.byteman.contrib.bmunit.BMRules;
|
||||
import org.jboss.byteman.contrib.bmunit.BMUnitRunner;
|
||||
import org.jboss.logging.Logger;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
@ -37,6 +38,11 @@ import org.junit.runner.RunWith;
|
|||
|
||||
@RunWith(BMUnitRunner.class)
|
||||
public class OrphanedConsumerTest extends ActiveMQTestBase {
|
||||
private static final Logger log = Logger.getLogger(OrphanedConsumerTest.class);
|
||||
|
||||
private static void debugLog(String message) {
|
||||
log.debug(message);
|
||||
}
|
||||
|
||||
private static boolean conditionActive = true;
|
||||
|
||||
|
@ -109,7 +115,7 @@ public class OrphanedConsumerTest extends ActiveMQTestBase {
|
|||
targetMethod = "close",
|
||||
targetLocation = "AT EXIT",
|
||||
condition = "org.apache.activemq.artemis.tests.extras.byteman.OrphanedConsumerTest.isConditionActive()",
|
||||
action = "log.debug(\"throwing stuff\");throw new InterruptedException()"), @BMRule(
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.OrphanedConsumerTest.debugLog(\"throwing stuff\");throw new InterruptedException()"), @BMRule(
|
||||
name = "closeEnter",
|
||||
targetClass = "org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl",
|
||||
targetMethod = "close",
|
||||
|
@ -136,7 +142,7 @@ public class OrphanedConsumerTest extends ActiveMQTestBase {
|
|||
targetMethod = "close",
|
||||
targetLocation = "AT EXIT",
|
||||
condition = "org.apache.activemq.artemis.tests.extras.byteman.OrphanedConsumerTest.isConditionActive()",
|
||||
action = "log.debug(\"throwing stuff\");throw new InterruptedException()"), @BMRule(
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.OrphanedConsumerTest.debugLog(\"throwing stuff\");throw new InterruptedException()"), @BMRule(
|
||||
name = "closeEnter",
|
||||
targetClass = "org.apache.activemq.artemis.core.server.impl.ServerConsumerImpl",
|
||||
targetMethod = "close",
|
||||
|
|
|
@ -42,6 +42,10 @@ import org.junit.runner.RunWith;
|
|||
public class StartStopDeadlockTest extends ActiveMQTestBase {
|
||||
private static final Logger log = Logger.getLogger(StartStopDeadlockTest.class);
|
||||
|
||||
private static void debugLog(String message) {
|
||||
log.debug(message);
|
||||
}
|
||||
|
||||
/*
|
||||
* simple test to make sure connect still works with some network latency built into netty
|
||||
* */
|
||||
|
@ -54,7 +58,7 @@ public class StartStopDeadlockTest extends ActiveMQTestBase {
|
|||
targetMethod = "initialisePart2",
|
||||
targetLocation = "ENTRY",
|
||||
condition = "incrementCounter(\"server-Init\") == 2",
|
||||
action = "log.debug(\"server backup init\"), waitFor(\"start-init\")"), @BMRule(
|
||||
action = "org.apache.activemq.artemis.tests.extras.byteman.StartStopDeadlockTest.debugLog(\"server backup init\"), waitFor(\"start-init\")"), @BMRule(
|
||||
name = "JMSServer.stop wait-init",
|
||||
targetClass = "org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl",
|
||||
targetMethod = "stop",
|
||||
|
|
Loading…
Reference in New Issue