summaryrefslogtreecommitdiff
path: root/java/systests/src
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2008-11-07 11:17:04 +0000
committerMartin Ritchie <ritchiem@apache.org>2008-11-07 11:17:04 +0000
commit4b2292e58ba8127f5e4609d13f52dfcdbd140d6b (patch)
treec38b823c795c69ce6b670d7645ab2edef26c6611 /java/systests/src
parentadd46c9e8c0db269b83710b9fc0a90ddf96121f4 (diff)
downloadqpid-python-4b2292e58ba8127f5e4609d13f52dfcdbd140d6b.tar.gz
QPID-1439 : Updates to ensure we maintain the log files from each external Java broker test run. The C++ log directory could do with a similar setup change.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@712110 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/systests/src')
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java b/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
index 4be67c9590..7bf61365ce 100644
--- a/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
@@ -148,6 +148,8 @@ public class QpidTestCase extends TestCase
private InitialContext _initialContext;
private AMQConnectionFactory _connectionFactory;
+ private String _testName;
+
// the connections created for a given test
protected List<Connection> _connections = new ArrayList<Connection>();
@@ -163,7 +165,7 @@ public class QpidTestCase extends TestCase
public void runBare() throws Throwable
{
- String name = getClass().getSimpleName() + "." + getName();
+ _testName = getClass().getSimpleName() + "." + getName();
String qname = getClass().getName() + "." + getName();
PrintStream oldOut = System.out;
@@ -179,7 +181,7 @@ public class QpidTestCase extends TestCase
System.setErr(err);
}
- _logger.info("========== start " + name + " ==========");
+ _logger.info("========== start " + _testName + " ==========");
startBroker();
try
{
@@ -195,7 +197,7 @@ public class QpidTestCase extends TestCase
{
_logger.error("exception stopping broker", e);
}
- _logger.info("========== stop " + name + " ==========");
+ _logger.info("========== stop " + _testName + " ==========");
if (redirected)
{
@@ -347,6 +349,10 @@ public class QpidTestCase extends TestCase
//Augment Path with bin directory in QPID_HOME.
env.put("PATH", env.get("PATH").concat(File.pathSeparator + qpidHome + "/bin"));
+ //Set QPID_WORK on a per test basis to maintain broker logs.
+ String qpidWork = System.getProperty("QPID_WORK");
+ env.put("QPID_WORK", qpidWork + File.separator + _testName );
+
process = pb.start();
Piper p = new Piper(process.getInputStream(),