You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by "gemmellr (via GitHub)" <gi...@apache.org> on 2023/07/20 14:31:31 UTC
[GitHub] [activemq-artemis] gemmellr commented on a diff in pull request #4545: ARTEMIS-4355 Update Curator to 5.5.0; Zookeeper 3.8.2
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: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org