summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/unit/close/JavaServerCloseRaceConditionTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/test/unit/close/JavaServerCloseRaceConditionTest.java b/java/systests/src/main/java/org/apache/qpid/test/unit/close/JavaServerCloseRaceConditionTest.java
index 7ff603df96..3eddc8d7a5 100644
--- a/java/systests/src/main/java/org/apache/qpid/test/unit/close/JavaServerCloseRaceConditionTest.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/unit/close/JavaServerCloseRaceConditionTest.java
@@ -65,5 +65,22 @@ public class JavaServerCloseRaceConditionTest extends QpidTestCase
fail("Cause was not AMQAuthenticationException. Was " + e.getClass() + ":" + e.getMessage());
}
}
+
+ try
+ {
+ // Depending on if the notification thread has closed the connection
+ // or not we may get an exception here when we attempt to close the
+ // connection. If we do get one then it should be the same as above
+ // an AMQAuthenticationException.
+ connection.close();
+ }
+ catch (Exception e)
+ {
+ if (!(e instanceof AMQAuthenticationException))
+ {
+ fail("Cause was not AMQAuthenticationException. Was " + e.getClass() + ":" + e.getMessage());
+ }
+ }
+
}
}