From 5eb36a210ab9e2bed9d06fc0e5a92ffad09cc66a Mon Sep 17 00:00:00 2001 From: Martin Ritchie Date: Tue, 31 Oct 2006 13:02:20 +0000 Subject: Updated to programmatically set QPID_WORK for logging, to stop failed builds git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@469470 13f79535-47bb-0310-9956-ffa450edef68 --- .../test/src/org/apache/qpid/ack/DisconnectAndRedeliverTest.java | 9 ++++++++- java/client/test/src/org/apache/qpid/ack/RecoverTest.java | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'java/client/test/src') diff --git a/java/client/test/src/org/apache/qpid/ack/DisconnectAndRedeliverTest.java b/java/client/test/src/org/apache/qpid/ack/DisconnectAndRedeliverTest.java index 68460682ec..6034247e48 100644 --- a/java/client/test/src/org/apache/qpid/ack/DisconnectAndRedeliverTest.java +++ b/java/client/test/src/org/apache/qpid/ack/DisconnectAndRedeliverTest.java @@ -40,8 +40,15 @@ public class DisconnectAndRedeliverTest static { + String workdir = System.getProperty("QPID_WORK"); + if (workdir == null || workdir.equals("")) + { + String tempdir = System.getProperty("java.io.tmpdir"); + System.out.println("QPID_WORK not set using tmp directory: " + tempdir); + System.setProperty("QPID_WORK", tempdir); + } //DOMConfigurator.configure("../etc/log4j.xml"); - DOMConfigurator.configure("broker/etc/log4j.xml"); + DOMConfigurator.configure("broker/etc/log4j.xml"); } @Before diff --git a/java/client/test/src/org/apache/qpid/ack/RecoverTest.java b/java/client/test/src/org/apache/qpid/ack/RecoverTest.java index 0feecb5a79..e12ca45de3 100644 --- a/java/client/test/src/org/apache/qpid/ack/RecoverTest.java +++ b/java/client/test/src/org/apache/qpid/ack/RecoverTest.java @@ -38,6 +38,13 @@ public class RecoverTest static { + String workdir = System.getProperty("QPID_WORK"); + if (workdir == null || workdir.equals("")) + { + String tempdir = System.getProperty("java.io.tmpdir"); + System.out.println("QPID_WORK not set using tmp directory: " + tempdir); + System.setProperty("QPID_WORK", tempdir); + } //DOMConfigurator.configure("../etc/log4j.xml"); DOMConfigurator.configure("broker/etc/log4j.xml"); } @@ -45,7 +52,7 @@ public class RecoverTest @After public void stopVmBroker() { - TransportConnection.killVMBroker(1); + TransportConnection.killVMBroker(1); } @Test -- cgit v1.2.1