diff options
author | Robert Gemmell <robbie@apache.org> | 2009-10-20 14:46:51 +0000 |
---|---|---|
committer | Robert Gemmell <robbie@apache.org> | 2009-10-20 14:46:51 +0000 |
commit | 1503ab35e3eb29f59b2f8431cf41c9f74ce1689c (patch) | |
tree | fe41be7689355a553281f15085d18d4fb885efd2 | |
parent | cc12b352d19e7f51eba772300535b2751484b1fb (diff) | |
download | qpid-python-1503ab35e3eb29f59b2f8431cf41c9f74ce1689c.tar.gz |
QPID-2055: update test to ensure all test files created are cleared up
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@827592 13f79535-47bb-0310-9956-ffa450edef68
2 files changed, 12 insertions, 1 deletions
diff --git a/qpid/java/broker/src/test/java/org/apache/log4j/xml/QpidLog4JConfiguratorTest.java b/qpid/java/broker/src/test/java/org/apache/log4j/xml/QpidLog4JConfiguratorTest.java index 9f350033d6..445c7d57f2 100644 --- a/qpid/java/broker/src/test/java/org/apache/log4j/xml/QpidLog4JConfiguratorTest.java +++ b/qpid/java/broker/src/test/java/org/apache/log4j/xml/QpidLog4JConfiguratorTest.java @@ -41,7 +41,7 @@ public class QpidLog4JConfiguratorTest extends TestCase File tmpFile = null; try { - tmpFile = File.createTempFile("LogManMBeanTestLog4jConfig", ".tmp"); + tmpFile = File.createTempFile("QpidLog4JConfiguratorTestLog4jConfig", ".tmp"); tmpFile.deleteOnExit(); FileWriter fstream = new FileWriter(tmpFile); diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/logging/management/LoggingManagementMBeanTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/logging/management/LoggingManagementMBeanTest.java index da60db2772..eff6a6f59f 100644 --- a/qpid/java/broker/src/test/java/org/apache/qpid/server/logging/management/LoggingManagementMBeanTest.java +++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/logging/management/LoggingManagementMBeanTest.java @@ -59,6 +59,17 @@ public class LoggingManagementMBeanTest extends TestCase { _testConfigFile = createTempTestLog4JConfig(); } + + protected void tearDown() throws Exception + { + File oldTestConfigFile = new File(_testConfigFile.getAbsolutePath() + ".old"); + if(oldTestConfigFile.exists()) + { + oldTestConfigFile.delete(); + } + + _testConfigFile.delete(); + } private File createTempTestLog4JConfig() { |