summaryrefslogtreecommitdiff
path: root/qpid/java/systests
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
commit704a2ec4214dddc85517b66811f22e7fa9cb38a8 (patch)
treec76c268cfe3e84062921b85f13984e3efd98b232 /qpid/java/systests
parent691e574f2b74a81c29e25a1ace11f5ce5c792f15 (diff)
downloadqpid-python-704a2ec4214dddc85517b66811f22e7fa9cb38a8.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@712110 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/systests')
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
index 4be67c9590..7bf61365ce 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
+++ b/qpid/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(),