Skip to content

Commit

Permalink
Add meaningful .toString to NoopLogRecordProcessor
Browse files Browse the repository at this point in the history
  • Loading branch information
iRevive committed May 31, 2023
1 parent 83f9144 commit aa1c7f0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@ private NoopLogRecordProcessor() {}

@Override
public void onEmit(Context context, ReadWriteLogRecord logRecord) {}

@Override
public String toString() {
return "NoopLogRecordProcessor";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,9 @@ void noCrash() {
assertThat(logRecordProcessor.forceFlush().isSuccess()).isEqualTo(true);
assertThat(logRecordProcessor.shutdown().isSuccess()).isEqualTo(true);
}

@Test
void toString_Valid() {
assertThat(NoopLogRecordProcessor.getInstance().toString()).isEqualTo("NoopLogRecordProcessor");
}
}

0 comments on commit aa1c7f0

Please sign in to comment.