Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFKA-14408: Consider enabling DEBUG log level on tests for Streams #12878

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion streams/src/test/resources/log4j.properties
Expand Up @@ -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
Expand Down