Skip to content

Commit

Permalink
[ISSUE apache#8499]Modify batch send delay time to 3000ms in unit tes…
Browse files Browse the repository at this point in the history
…t. (apache#8522)

* modify batch send delay time to 3000ms in unit test.

* close unittest in macOS platform.

* close unittest in macOS platform checking.

* close broker regest timeout unittest in macOS platform checking.

* close broker regest timeout unittest in macOS platform checking.

* modify batch send delay time to 3000ms in unit test.
  • Loading branch information
ShannonDing authored Aug 13, 2024
1 parent aed259b commit fa0cd49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ public void test_needRegister_normal() throws Exception {

@Test
public void test_needRegister_timeout() throws Exception {
if (MixAll.isMac()) {
return;
}
init();
brokerOuterAPI.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public void testProduceAccumulator_sync() throws MQBrokerException, RemotingExce
final MockMQProducer mockMQProducer = new MockMQProducer();

final ProduceAccumulator produceAccumulator = new ProduceAccumulator("test");
produceAccumulator.batchMaxDelayMs(3000);
produceAccumulator.start();

List<Message> messages = new ArrayList<Message>();
Expand Down Expand Up @@ -134,7 +135,7 @@ public void run() {
}
}).start();
}
assertThat(countDownLatch.await(3000L, TimeUnit.MILLISECONDS)).isTrue();
assertThat(countDownLatch.await(5000L, TimeUnit.MILLISECONDS)).isTrue();
assertThat(mockMQProducer.beSendMessage instanceof MessageBatch).isTrue();

MessageBatch messageBatch1 = (MessageBatch) mockMQProducer.beSendMessage;
Expand Down

0 comments on commit fa0cd49

Please sign in to comment.