jbertram commented on a change in pull request #3246:
URL: https://github.com/apache/activemq-artemis/pull/3246#discussion_r477395923



##########
File path: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java
##########
@@ -1412,12 +1413,26 @@ public void testSendMessageUpdateRoleCached() throws 
Exception {
 
       securityManager.getConfiguration().addRole("auser", "receiver");
 
-      session.createConsumer(SecurityTest.queueA);
+      Wait.assertTrue(() -> {
+         try {
+            session.createConsumer(SecurityTest.queueA);
+            return true;
+         } catch (Exception e) {
+            return false;
+         }
+      }, 2000, 100);
 
       // Removing the Role... the check should be cached, so the next 
createConsumer shouldn't fail
       securityManager.getConfiguration().removeRole("auser", "receiver");

Review comment:
       That test was meant to (among other things) exercise the _authorization_ 
cache. However, with the introduction of the authentication cache the semantics 
changed a bit. I've updated the test to make this more clear. Thanks for the 
review.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to