You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/06/25 08:08:45 UTC
[GitHub] [pulsar] mattisonchao opened a new pull request #11093: [Issues 11077] fixed flaky test ConsumedLedgersTrimTest
mattisonchao opened a new pull request #11093:
URL: https://github.com/apache/pulsar/pull/11093
Fixes #11077
Master Issue: #11077
### Motivation
Although it is difficult for me to reproduce it locally,
I think we should wait for this asynchronous operation here.
### Modifications
- Add Awaitility method to assert.
--
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:
users@infra.apache.org
[GitHub] [pulsar] codelipenghui commented on a change in pull request #11093: [Issues 11077] fixed flaky test ConsumedLedgersTrimTest
Posted by GitBox <gi...@apache.org>.
codelipenghui commented on a change in pull request #11093:
URL: https://github.com/apache/pulsar/pull/11093#discussion_r658638158
##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ConsumedLedgersTrimTest.java
##########
@@ -150,8 +150,8 @@ public void testConsumedLedgersTrimNoSubscriptions() throws Exception {
pulsar.getAdminClient().topics().getStats(topicName);
MessageId messageIdAfterRestart = pulsar.getAdminClient().topics().getLastMessageId(topicName);
LOG.info("lastmessageid " + messageIdAfterRestart);
- assertEquals(messageIdAfterRestart, messageIdBeforeRestart);
-
+ Awaitility.await().untilAsserted(()->
+ assertEquals(messageIdAfterRestart, messageIdBeforeRestart));
Review comment:
The `messageIdAfterRestart` and `messageIdBeforeRestart` will never be changed when you retry the condition by using Awaitility, so it will not fix the flaky test but increase the test time while `messageIdAfterRestart` not equals `messageIdBeforeRestart`
--
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:
users@infra.apache.org
[GitHub] [pulsar] mattisonchao closed pull request #11093: [Issues 11077] fixed flaky test ConsumedLedgersTrimTest
Posted by GitBox <gi...@apache.org>.
mattisonchao closed pull request #11093:
URL: https://github.com/apache/pulsar/pull/11093
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] mattisonchao commented on a change in pull request #11093: [Issues 11077] fixed flaky test ConsumedLedgersTrimTest
Posted by GitBox <gi...@apache.org>.
mattisonchao commented on a change in pull request #11093:
URL: https://github.com/apache/pulsar/pull/11093#discussion_r658651968
##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ConsumedLedgersTrimTest.java
##########
@@ -150,8 +150,8 @@ public void testConsumedLedgersTrimNoSubscriptions() throws Exception {
pulsar.getAdminClient().topics().getStats(topicName);
MessageId messageIdAfterRestart = pulsar.getAdminClient().topics().getLastMessageId(topicName);
LOG.info("lastmessageid " + messageIdAfterRestart);
- assertEquals(messageIdAfterRestart, messageIdBeforeRestart);
-
+ Awaitility.await().untilAsserted(()->
+ assertEquals(messageIdAfterRestart, messageIdBeforeRestart));
Review comment:
Thanks to your review, I will try to fix it again.
--
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:
users@infra.apache.org