+ minor improvements to RedisMLC
This commit is contained in:
@@ -203,8 +203,9 @@ public class RedisMessageListenerContainer implements InitializingBean, Disposab
|
||||
if (isRunning()) {
|
||||
running = false;
|
||||
synchronized (monitor) {
|
||||
boolean shouldWait = listening;
|
||||
subscriptionTask.cancel();
|
||||
if (listening) {
|
||||
if (shouldWait) {
|
||||
try {
|
||||
monitor.wait(initWait);
|
||||
} catch (InterruptedException ex) {
|
||||
|
||||
@@ -49,7 +49,7 @@ public class NamespaceTest {
|
||||
public void testSanityTest() throws Exception {
|
||||
RedisMessageListenerContainer container = ctx.getBean(RedisMessageListenerContainer.class);
|
||||
assertTrue(container.isRunning());
|
||||
//Thread.sleep(TimeUnit.SECONDS.toMillis(1));
|
||||
Thread.sleep(TimeUnit.SECONDS.toMillis(2));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -57,7 +57,7 @@ public class NamespaceTest {
|
||||
StringRedisTemplate template = ctx.getBean(StringRedisTemplate.class);
|
||||
template.convertAndSend("x1", "[X]test");
|
||||
template.convertAndSend("z1", "[Z]test");
|
||||
//Thread.sleep(TimeUnit.SECONDS.toMillis(5));
|
||||
Thread.sleep(TimeUnit.SECONDS.toMillis(5));
|
||||
}
|
||||
|
||||
public void testErrorHandler() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user