kfaraz commented on code in PR #19651:
URL: https://github.com/apache/druid/pull/19651#discussion_r3556109794
##########
indexing-service/src/test/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorStateTest.java:
##########
@@ -2116,6 +2117,85 @@ public void testRegisterNewVersionOfPendingSegment()
Assert.assertEquals(pendingSegmentRecord0, captured0.getValue());
Assert.assertEquals(pendingSegmentRecord1, captured1.getValue());
+
+ // Both records matched a running task, so each emits a notified metric
and none is unmatched.
+ Assert.assertEquals(2,
emitter.getMetricEventCount(SegmentUpgradeMetrics.NOTIFIED));
+ Assert.assertEquals(0,
emitter.getMetricEventCount(SegmentUpgradeMetrics.UNMATCHED));
+ verifyAll();
+ }
+
+ @Test
+ public void testRegisterNewVersionOfPendingSegmentUnmatchedEmitsMetric()
+ {
+ EasyMock.expect(spec.isSuspended()).andReturn(false);
+ replayAll();
+
+ final TestSeekableStreamSupervisor supervisor = new
TestSeekableStreamSupervisor();
+ supervisor.getIoConfig().setTaskCount(3);
+ supervisor.start();
+
+ supervisor.addTaskGroupToActivelyReadingTaskGroup(
+ supervisor.getTaskGroupIdForPartition("0"),
+ ImmutableMap.of("0", "5"),
Review Comment:
Oh, I see. Thanks for the clarification!
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]