lizhanhui commented on code in PR #4980:
URL: https://github.com/apache/rocketmq/pull/4980#discussion_r962483017
##########
test/src/test/java/org/apache/rocketmq/test/smoke/NormalMessageSendAndRecvIT.java:
##########
@@ -57,13 +60,33 @@ public void setUp() throws Exception {
@After
public void tearDown() {
- super.shutdown();
+ BaseConf.shutdown();
}
@Test
public void testSynSendMessage() throws Exception {
+ List<MessageQueue> messageQueueList;
+ ConsumeStats consumeStats;
+
+ // Wait till producer and consumer are fully started.
+ while (true) {
+ try {
+ consumeStats = defaultMQAdminExt.examineConsumeStats(group);
+ messageQueueList =
producer.getProducer().fetchPublishMessageQueues(topic);
+ if (!messageQueueList.isEmpty() && null != consumeStats
+ &&
consumeStats.getOffsetTable().keySet().containsAll(messageQueueList)) {
+ break;
+ } else {
+
+ TimeUnit.MILLISECONDS.sleep(100);
Review Comment:
It's virtually the same busy polling way.
--
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]