cshannon commented on code in PR #2544:
URL: https://github.com/apache/activemq/pull/2544#discussion_r4007266157
##########
activemq-unit-tests/src/test/java/org/apache/activemq/usecases/ExceptionListenerTest.java:
##########
@@ -107,6 +108,20 @@ public boolean isSatisified() throws Exception {
assertTrue("expected exception: " + expected,
expected.getCause().getCause() instanceof SecurityException);
+ // ActiveMQConnection.onException delivers the security failure to the
+ // ExceptionListener and marks the transport failed on two independent
+ // async tasks. The listener firing above does not guarantee the
transport
+ // is failed yet, so wait for the failed state; otherwise
createSession can
+ // race a mid-dispose transport and see JMSException("Stopped.")
instead of
+ // the expected ConnectionFailedException.
+ final ActiveMQConnection amqConnection = (ActiveMQConnection)
connection;
+ Wait.waitFor(new Wait.Condition() {
Review Comment:
Also should assert true that and not just continue if it fails
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact