divijvaidya commented on code in PR #12459: URL: https://github.com/apache/kafka/pull/12459#discussion_r935548150
########## streams/src/test/java/org/apache/kafka/streams/state/internals/metrics/RocksDBMetricsRecorderTest.java: ########## @@ -279,449 +310,335 @@ public void shouldThrowIfDbToAddWasAlreadyAddedForOtherSegment() { recorder.addValueProviders(SEGMENT_STORE_NAME_1, dbToAdd1, cacheToAdd1, statisticsToAdd1); final Throwable exception = assertThrows( - IllegalStateException.class, - () -> recorder.addValueProviders(SEGMENT_STORE_NAME_2, dbToAdd1, cacheToAdd2, statisticsToAdd2) + IllegalStateException.class, + () -> recorder.addValueProviders(SEGMENT_STORE_NAME_2, dbToAdd1, cacheToAdd2, statisticsToAdd2) ); assertThat( - exception.getMessage(), - is("DB instance for store " + SEGMENT_STORE_NAME_2 + " of task " + TASK_ID1 + - " was already added for another segment as a value provider. This is a bug in Kafka Streams. " + - "Please open a bug report under https://issues.apache.org/jira/projects/KAFKA/issues") + exception.getMessage(), + is("DB instance for store " + SEGMENT_STORE_NAME_2 + " of task " + TASK_ID1 + + " was already added for another segment as a value provider. This is a bug in Kafka Streams. " + + "Please open a bug report under https://issues.apache.org/jira/projects/KAFKA/issues") ); } @Test public void shouldAddItselfToRecordingTriggerWhenFirstValueProvidersAreAddedToNewlyCreatedRecorder() { - recordingTrigger.addMetricsRecorder(recorder); - replay(recordingTrigger); - recorder.addValueProviders(SEGMENT_STORE_NAME_1, dbToAdd1, cacheToAdd1, statisticsToAdd1); - verify(recordingTrigger); + verify(recordingTrigger).addMetricsRecorder(eq(recorder)); Review Comment: Fixed -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org