Use proper subscribe methods and fix nullability assumptions.

See: #964
Original Pull Request: #2256
This commit is contained in:
Mark Paluch
2022-02-11 08:31:18 +01:00
committed by Christoph Strobl
parent 5959efb3af
commit 5681ddce68
2 changed files with 14 additions and 11 deletions

View File

@@ -210,12 +210,10 @@ public class PubSubResubscribeTests {
container.stop();
String uniqueChannel = "random-" + UUID.randomUUID();
PubSubAwaitUtil.runAndAwaitPatternSubscription(template.getConnectionFactory(), () -> {
container.addMessageListener(adapter,
Arrays.asList(new Topic[] { new ChannelTopic(uniqueChannel), new PatternTopic("s*") }));
container.start();
});
container.addMessageListener(adapter,
Arrays.asList(new Topic[] { new ChannelTopic(uniqueChannel), new PatternTopic("s*") }));
container.start();
// timing: There's currently no other way to synchronize
// than to hope the subscribe/unsubscribe are executed within the time.