diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2009-10-05 15:00:20 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2009-10-05 15:00:20 +0000 |
| commit | 5204cccd9ec24f8e407b06ed3a7b9d37b33c10a1 (patch) | |
| tree | 117186a3120717308b75afda8a733c93fc6e42b8 /qpid/java | |
| parent | 473a49492a878055d7ab81ffaf5c472e85fb892d (diff) | |
| download | qpid-python-5204cccd9ec24f8e407b06ed3a7b9d37b33c10a1.tar.gz | |
Update to ensure system properties are always reset even if exception ocurrs during tearDown
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@821820 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
| -rw-r--r-- | qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java | 17 |
1 files changed, 11 insertions, 6 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 666c97c9de..95ce3a06b5 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 @@ -1021,14 +1021,19 @@ public class QpidTestCase extends TestCase protected void tearDown() throws java.lang.Exception { - // close all the connections used by this test. - for (Connection c : _connections) + try { - c.close(); + // close all the connections used by this test. + for (Connection c : _connections) + { + c.close(); + } + } + finally{ + // Ensure any problems with close does not interfer with property resets + revertSystemProperties(); + revertLoggingLevels(); } - - revertSystemProperties(); - revertLoggingLevels(); } /** |
