xvrl commented on a change in pull request #11417: URL: https://github.com/apache/druid/pull/11417#discussion_r668345853
########## File path: indexing-service/src/test/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorStateTest.java ########## @@ -715,13 +725,51 @@ public void testEmitTimeLag() throws Exception latch.await(); - Assert.assertEquals(3, emitter.getEvents().size()); - Assert.assertEquals("ingest/test/lag/time", emitter.getEvents().get(0).toMap().get("metric")); - Assert.assertEquals(45000L, emitter.getEvents().get(0).toMap().get("value")); - Assert.assertEquals("ingest/test/maxLag/time", emitter.getEvents().get(1).toMap().get("metric")); - Assert.assertEquals(20000L, emitter.getEvents().get(1).toMap().get("value")); - Assert.assertEquals("ingest/test/avgLag/time", emitter.getEvents().get(2).toMap().get("metric")); - Assert.assertEquals(15000L, emitter.getEvents().get(2).toMap().get("value")); + List<Event> events = emitter.getEvents(); + List<String> whitelist = Arrays.asList("ingest/test/lag/time", "ingest/test/maxLag/time", "ingest/test/avgLag/time"); + events = filterMetrics(events, whitelist); + Assert.assertEquals(3, events.size()); + Assert.assertEquals("ingest/test/lag/time", events.get(0).toMap().get("metric")); + Assert.assertEquals(45000L, events.get(0).toMap().get("value")); + Assert.assertEquals("ingest/test/maxLag/time", events.get(1).toMap().get("metric")); + Assert.assertEquals(20000L, events.get(1).toMap().get("value")); + Assert.assertEquals("ingest/test/avgLag/time", events.get(2).toMap().get("metric")); + Assert.assertEquals(15000L, events.get(2).toMap().get("value")); + verifyAll(); + } + + @Test + public void testEmitNoticesQueueSize() throws Exception Review comment: can we also add a test for the notice time? -- 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: commits-unsubscr...@druid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org