Skip to content

Commit

Permalink
fix: fix the receive timeout of simple ack and pull order
Browse files Browse the repository at this point in the history
Signed-off-by: wangxye <[email protected]>
  • Loading branch information
wangxye committed Nov 9, 2023
1 parent 998514d commit 5a6d2e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void testFIFO_pull_receive_nack() {

RMQNormalConsumer consumer = ConsumerFactory.getRMQPullConsumer(namesrvAddr, groupId, rpcHook);
consumer.startDefaultPull();
VerifyUtils.tryReceiveOnce(consumer.getPullConsumer(), topic, tag, 32);
// VerifyUtils.tryReceiveOnce(consumer.getPullConsumer(), topic, tag, 32);
RMQNormalProducer producer = ProducerFactory.getRMQProducer(namesrvAddr, rpcHook);
Assertions.assertNotNull(producer, "Get producer failed");

Expand Down Expand Up @@ -147,8 +147,9 @@ public void testFIFO_pull_receive_nack() {
futures[mqCount++] = future;
}
try {
CompletableFuture.allOf(futures).get(60, TimeUnit.SECONDS);
CompletableFuture.allOf(futures).get(120, TimeUnit.SECONDS);
} catch (Exception e) {
System.out.printf("exception occurred: %s%n", e.getCause());
e.printStackTrace();
Assertions.fail("receive response count not match");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void testNormal_simple_receiveAsync_ack() {
String groupId = getGroupId(methodName);

SimpleConsumer consumer = ConsumerFactory.getSimpleConsumer(account, topic, groupId, new FilterExpression(tag), Duration.ofSeconds(10));
VerifyUtils.tryReceiveOnce(consumer);
// VerifyUtils.tryReceiveOnce(consumer);

producer = ProducerFactory.getRMQProducer(account, topic);
Assertions.assertNotNull(producer, "Get Producer failed");
Expand All @@ -120,7 +120,7 @@ public void testNormal_simple_receive_ackAsync() {
String groupId = getGroupId(methodName);

SimpleConsumer consumer = ConsumerFactory.getSimpleConsumer(account, topic, groupId, new FilterExpression(tag), Duration.ofSeconds(10));
VerifyUtils.tryReceiveOnce(consumer);
// VerifyUtils.tryReceiveOnce(consumer);

producer = ProducerFactory.getRMQProducer(account, topic);
Assertions.assertNotNull(producer, "Get Producer failed");
Expand All @@ -142,7 +142,7 @@ public void testNormal_simple_receiveAsync_ackAsync() {
String groupId = getGroupId(methodName);

SimpleConsumer consumer = ConsumerFactory.getSimpleConsumer(account, topic, groupId, new FilterExpression(tag), Duration.ofSeconds(10));
VerifyUtils.tryReceiveOnce(consumer);
// VerifyUtils.tryReceiveOnce(consumer);

producer = ProducerFactory.getRMQProducer(account, topic);
Assertions.assertNotNull(producer, "Get Producer failed");
Expand Down

0 comments on commit 5a6d2e4

Please sign in to comment.