Debug logging for InboundGatewayTests

This commit is contained in:
Gary Russell
2018-02-14 11:14:52 -05:00
committed by Artem Bilan
parent bd774de5c0
commit accd2d9088

View File

@@ -28,6 +28,7 @@ import org.apache.kafka.clients.consumer.Consumer;
import org.apache.kafka.clients.consumer.ConsumerConfig;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
@@ -36,6 +37,7 @@ import org.springframework.integration.channel.QueueChannel;
import org.springframework.integration.handler.advice.ErrorMessageSendingRecoverer;
import org.springframework.integration.kafka.support.RawRecordHeaderErrorMessageStrategy;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.integration.test.rule.Log4j2LevelAdjuster;
import org.springframework.kafka.core.ConsumerFactory;
import org.springframework.kafka.core.DefaultKafkaConsumerFactory;
import org.springframework.kafka.core.DefaultKafkaProducerFactory;
@@ -83,6 +85,10 @@ public class InboundGatewayTests {
public static KafkaEmbedded embeddedKafka = new KafkaEmbedded(1, true, topic1, topic2, topic3, topic4, topic5,
topic6);
@Rule
public Log4j2LevelAdjuster adjuster = Log4j2LevelAdjuster.debug().categories("org.apache.kafka.clients",
"org.springframework.kafka", "org.springframework.integration");
@Test
public void testInbound() throws Exception {
Map<String, Object> props = KafkaTestUtils.consumerProps("test1", "false", embeddedKafka);