提交 3d1ec328 编写于 作者: D dongeforever

Fix error tests, producer should wait a while for consumer to be ready

上级 0fe94717
...@@ -50,13 +50,13 @@ public class BroadCastNormalMsgNotRecvIT extends BaseBroadCastIT { ...@@ -50,13 +50,13 @@ public class BroadCastNormalMsgNotRecvIT extends BaseBroadCastIT {
} }
@Test @Test
public void testNotConsumeAfterConsume() { public void testNotConsumeAfterConsume() throws Exception {
int msgSize = 16; int msgSize = 16;
String group = initConsumerGroup(); String group = initConsumerGroup();
RMQBroadCastConsumer consumer1 = getBroadCastConsumer(nsAddr, group, topic, "*", RMQBroadCastConsumer consumer1 = getBroadCastConsumer(nsAddr, group, topic, "*",
new RMQNormalListner(group + "_1")); new RMQNormalListner(group + "_1"));
Thread.sleep(3000);
producer.send(msgSize); producer.send(msgSize);
Assert.assertEquals("Not all sent succeeded", msgSize, producer.getAllUndupMsgBody().size()); Assert.assertEquals("Not all sent succeeded", msgSize, producer.getAllUndupMsgBody().size());
......
...@@ -80,6 +80,7 @@ public class AsyncSendWithMessageQueueSelectorIT extends BaseConf { ...@@ -80,6 +80,7 @@ public class AsyncSendWithMessageQueueSelectorIT extends BaseConf {
producer.clearMsg(); producer.clearMsg();
consumer.clearMsg(); consumer.clearMsg();
producer.getSuccessSendResult().clear();
producer.asyncSend(msgSize, new MessageQueueSelector() { producer.asyncSend(msgSize, new MessageQueueSelector() {
@Override @Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册