kfaraz commented on code in PR #18742:
URL: https://github.com/apache/druid/pull/18742#discussion_r2532597252
##########
embedded-tests/src/test/java/org/apache/druid/testing/embedded/query/QueryVirtualStorageTest.java:
##########
@@ -152,88 +158,141 @@ void testQueryPartials()
"select count(*) from \"%s\" WHERE __time >= TIMESTAMP '2015-09-12
14:00:00' and __time < TIMESTAMP '2015-09-12 19:00:00'",
"select count(*) from \"%s\" WHERE __time >= TIMESTAMP '2015-09-12
19:00:00' and __time < TIMESTAMP '2015-09-13 00:00:00'"
};
- final long[] expectedResults = new long[] {
- 9770,
- 10524,
- 10267,
- 8683
- };
+ final long[] expectedResults = new long[]{9770, 10524, 10267, 8683};
+ final long[] expectedLoads = new long[]{8L, 6L, 5L, 5L};
+
+
+ LatchableEmitter emitter = historical.latchableEmitter();
+ // sleep to clear out the pipe to get zerod out storage monitor metrics
and then flush (which clears out the
+ // internal events stores in test emitter)
+ sleepForStorageMonitor();
Review Comment:
> I think i need a version that skips any already emitted events and only
waits for the next one
I see. That seems like a reasonable use case. I think you can add a method
`waitForNextEvent` but we would need to call out that it would be susceptible
to race conditions and may miss out on events and cause the test to wait
forever.
--
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]