diff --git a/streams/src/test/java/org/apache/kafka/streams/processor/internals/StoreChangelogReaderTest.java b/streams/src/test/java/org/apache/kafka/streams/processor/internals/StoreChangelogReaderTest.java index fbd0db99a0dc..8f4d6b85df39 100644 --- a/streams/src/test/java/org/apache/kafka/streams/processor/internals/StoreChangelogReaderTest.java +++ b/streams/src/test/java/org/apache/kafka/streams/processor/internals/StoreChangelogReaderTest.java @@ -396,7 +396,12 @@ public void shouldRestoreFromPositionAndCheckForCompletion() { public void shouldRestoreFromBeginningAndCheckCompletion() { final TaskId taskId = new TaskId(0, 0); - EasyMock.expect(storeMetadata.offset()).andReturn(null).andReturn(9L).anyTimes(); + // adding another null return to handle debug log where offset is printed. + if (type == STANDBY) { + EasyMock.expect(storeMetadata.offset()).andReturn(null).andReturn(null).andReturn(9L).anyTimes(); + } else { + EasyMock.expect(storeMetadata.offset()).andReturn(null).andReturn(9L).anyTimes(); + } EasyMock.expect(stateManager.changelogOffsets()).andReturn(singletonMap(tp, 5L)); EasyMock.expect(stateManager.taskId()).andReturn(taskId).anyTimes(); EasyMock.replay(stateManager, storeMetadata, store); diff --git a/streams/src/test/resources/log4j.properties b/streams/src/test/resources/log4j.properties index b7e1fb2d60ea..c3f42a7c3ecc 100644 --- a/streams/src/test/resources/log4j.properties +++ b/streams/src/test/resources/log4j.properties @@ -27,7 +27,7 @@ log4j.logger.org.apache.kafka.clients=ERROR # These are the only logs we will likely ever find anything useful in to debug Streams test failures log4j.logger.org.apache.kafka.clients.consumer=INFO log4j.logger.org.apache.kafka.clients.producer=INFO -log4j.logger.org.apache.kafka.streams=INFO +log4j.logger.org.apache.kafka.streams=DEBUG # printing out the configs takes up a huge amount of the allotted characters, # and provides little value as we can always figure out the test configs without the logs