Add small sleep between adding message to group
https://build.spring.io/browse/INT-FATS5IC-497 Fixes `JdbcMessageStoreTests` sporadic failure where there is no guarantee that message are going to be polled from the group the same order they've been inserted Cherry-pick to `5.0.x`
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -385,7 +385,9 @@ public class JdbcMessageStoreTests {
|
||||
String groupId = "X";
|
||||
|
||||
messageStore.addMessagesToGroup(groupId, MessageBuilder.withPayload("foo").setCorrelationId(groupId).build());
|
||||
Thread.sleep(10);
|
||||
messageStore.addMessagesToGroup(groupId, MessageBuilder.withPayload("bar").setCorrelationId(groupId).build());
|
||||
Thread.sleep(10);
|
||||
messageStore.addMessagesToGroup(groupId, MessageBuilder.withPayload("baz").setCorrelationId(groupId).build());
|
||||
|
||||
messageStore.addMessagesToGroup("Y", MessageBuilder.withPayload("barA").setCorrelationId(groupId).build(),
|
||||
|
||||
Reference in New Issue
Block a user