diff options
Diffstat (limited to 'qpid/java')
3 files changed, 14 insertions, 1 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AbstractTestLogging.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AbstractTestLogging.java index 9c1d302be0..f66ee38139 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AbstractTestLogging.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AbstractTestLogging.java @@ -48,6 +48,7 @@ import java.util.List; public class AbstractTestLogging extends QpidBrokerTestCase { public static final long DEFAULT_LOG_WAIT = 2000; + public static final String TEST_LOG_PREFIX = "MESSAGE"; protected LogMonitor _monitor; ServerConfiguration _serverConfiguration; @@ -56,6 +57,8 @@ public class AbstractTestLogging extends QpidBrokerTestCase @Override public void setUp() throws Exception { + setLogMessagePrefix(); + super.setUp(); _monitor = new LogMonitor(_outputFile); @@ -115,6 +118,12 @@ public class AbstractTestLogging extends QpidBrokerTestCase } + protected void setLogMessagePrefix() + { + //set the message prefix to facilitate scraping from the munged test output. + setSystemProperty("qpid.logging.prefix", TEST_LOG_PREFIX); + } + @Override public void tearDown() throws Exception { @@ -324,7 +333,7 @@ public class AbstractTestLogging extends QpidBrokerTestCase */ protected String getLog(String rawLog) { - int start = rawLog.indexOf("MESSAGE"); + int start = rawLog.indexOf(TEST_LOG_PREFIX); return rawLog.substring(start); } diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BrokerLoggingTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BrokerLoggingTest.java index 66bcc10c50..8fd2c085c3 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BrokerLoggingTest.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BrokerLoggingTest.java @@ -51,6 +51,8 @@ public class BrokerLoggingTest extends AbstractTestLogging public void setUp() throws Exception { + setLogMessagePrefix(); + // We either do this here or have a null check in tearDown. // As when this test is run against profiles other than java it will NPE _monitor = new LogMonitor(_outputFile); diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java index 7ab937b15f..595c0d5f35 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java @@ -47,6 +47,8 @@ public class ManagementLoggingTest extends AbstractTestLogging public void setUp() throws Exception { + setLogMessagePrefix(); + // We either do this here or have a null check in tearDown. // As when this test is run against profiles other than java it will NPE _monitor = new LogMonitor(_outputFile); |
