From 6a883281f4e9e0941a62d2dba44ac287b62f2b44 Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Wed, 8 Mar 2017 15:18:49 -0500 Subject: [PATCH] INT-4240: Redis Delayer Test Diagnostics https://jira.spring.io/browse/INT-4240 --- ...elayerHandlerRescheduleIntegrationTests-context.xml | 2 +- .../DelayerHandlerRescheduleIntegrationTests.java | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/DelayerHandlerRescheduleIntegrationTests-context.xml b/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/DelayerHandlerRescheduleIntegrationTests-context.xml index a1bf2b1e8c..853c495964 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/DelayerHandlerRescheduleIntegrationTests-context.xml +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/DelayerHandlerRescheduleIntegrationTests-context.xml @@ -20,7 +20,7 @@ diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/DelayerHandlerRescheduleIntegrationTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/DelayerHandlerRescheduleIntegrationTests.java index 8fd6dda7fe..dfc12d53a9 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/DelayerHandlerRescheduleIntegrationTests.java +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/store/DelayerHandlerRescheduleIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * Copyright 2013-2017 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. @@ -24,6 +24,7 @@ import static org.junit.Assert.fail; import java.util.concurrent.TimeUnit; +import org.apache.log4j.Level; import org.junit.Rule; import org.junit.Test; @@ -36,6 +37,7 @@ import org.springframework.integration.redis.rules.RedisAvailableTests; import org.springframework.integration.store.MessageGroup; import org.springframework.integration.store.MessageGroupStore; import org.springframework.integration.support.MessageBuilder; +import org.springframework.integration.test.rule.Log4jLevelAdjuster; import org.springframework.integration.test.support.LongRunningIntegrationTest; import org.springframework.messaging.Message; import org.springframework.messaging.MessageChannel; @@ -54,6 +56,10 @@ public class DelayerHandlerRescheduleIntegrationTests extends RedisAvailableTest @Rule public LongRunningIntegrationTest longTests = new LongRunningIntegrationTest(); + @Rule + public Log4jLevelAdjuster adjuster = new Log4jLevelAdjuster(Level.DEBUG, "org.springframework.integration", + "org.springframework.data.redis"); + @Test @RedisAvailable public void testDelayerHandlerRescheduleWithRedisMessageStore() throws Exception { @@ -116,7 +122,7 @@ public class DelayerHandlerRescheduleIntegrationTests extends RedisAvailableTest assertEquals(1, messageStore.getMessageGroupCount()); int n = 0; - while (n++ < 100 && messageStore.messageGroupSize(delayerMessageGroupId) > 0) { + while (n++ < 200 && messageStore.messageGroupSize(delayerMessageGroupId) > 0) { Thread.sleep(100); } assertEquals(0, messageStore.messageGroupSize(delayerMessageGroupId));