Add back synchronization to avoid corrupted subscription input/output streams

- Prevent simultaneous write of subscribe/unsubscribe using the same Connection

- Fix test failure by re-initializing "done" state of SubscriptionTask between runs and adding waits
This commit is contained in:
Jennifer Hickey
2013-04-04 23:29:42 -07:00
parent 8fbabb7eae
commit a01db2b732
2 changed files with 46 additions and 27 deletions

View File

@@ -207,6 +207,10 @@ public class PubSubResubscribeTests {
container.addMessageListener(adapter,
Arrays.asList(new Topic[] { new ChannelTopic(CHANNEL), new PatternTopic("s*") }));
container.start();
// Wait for async subscription tasks to setup
Thread.sleep(1000);
template.convertAndSend("somechannel", "HELLO");
template.convertAndSend(CHANNEL, "WORLD");