gemmellr commented on code in PR #4545:
URL: https://github.com/apache/activemq-artemis/pull/4545#discussion_r1269550857


##########
tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/quorum/ZookeeperPluggableQuorumPeerTest.java:
##########
@@ -48,15 +47,15 @@ public ZookeeperPluggableQuorumPeerTest() {
       // both roles as both wish to be primary but will revert to backup
       primary = new BrokerControl("primary-peer-a", JMX_PORT_PRIMARY, 
"zkReplicationPrimaryPeerA", PRIMARY_PORT_OFFSET);
       backup = new BrokerControl("primary-peer-b", JMX_PORT_BACKUP, 
"zkReplicationPrimaryPeerB", BACKUP_PORT_OFFSET);
-      brokers = new LinkedList(Arrays.asList(primary, backup));
+      brokers = Arrays.asList(primary, backup);
    }
 
    @Test
    @Override
    public void testBackupFailoverAndPrimaryFailback() throws Exception {
       // peers don't request fail back by default
       // just wait for setup to avoid partial stop of zk via fast tear down 
with async setup
-      Wait.waitFor(this::ensembleHasLeader);
+      
Assert.assertTrue(awaitAsyncSetupCompleted(TimeUnit.SECONDS.toMillis(30L), 
TimeUnit.MILLISECONDS));

Review Comment:
   Yes, it is related and pretty misleading. 
   
   As to the actual behaviour change here..rather than 'waiting for setup to 
complete' as it did before, for a test that isnt actually doing anything, 
changing things so that the test is skipped and setup doesnt occur would seem 
better...then it simply wont need to wait.
   
   Simplest change is perhaps just an Assume check that skips before the setup 
occurs. E.g override the @Before setup method and add an Assume check on the 
test name, before calling the super method. Maybe something like this 
(untested):
   Assume.assumeFalse("Test testBackupFailoverAndPrimaryFailback isnt 
applicable", "testBackupFailoverAndPrimaryFailback".equals(getName()));
   
   (May also need to update the super @After handling).
   



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

Reply via email to