rohangarg commented on code in PR #12397:
URL: https://github.com/apache/druid/pull/12397#discussion_r851944415
##########
extensions-core/lookups-cached-global/src/test/java/org/apache/druid/server/lookup/namespace/cache/CacheSchedulerTest.java:
##########
@@ -412,6 +420,62 @@ public void testEntryCloseForgotten() throws
InterruptedException
Assert.assertEquals(0, scheduler.getActiveEntries());
}
+ @Test(timeout = 60_000L)
+ public void testSimpleSubmissionSuccessWithWait() throws InterruptedException
+ {
+ UriExtractionNamespace namespace = new UriExtractionNamespace(
+ tmpFile.toURI(),
+ null, null,
+ new UriExtractionNamespace.ObjectMapperFlatDataParser(
+ UriExtractionNamespaceTest.registerTypes(new ObjectMapper())
+ ),
+ new Period(0),
+ null,
+ null
+ );
+ CacheScheduler.Entry entry = scheduler.scheduleAndWait(namespace, 10_000L);
+ waitFor(entry);
+ Assert.assertEquals(VALUE, entry.getCache().get(KEY));
+ }
+
+
+ @Test(timeout = 20_000L)
+ public void testSimpleSubmissionFailureWithWait() throws InterruptedException
Review Comment:
The timeout for the test is the assertion. The `scheduleAndWait` waits for
40s before the fix is done - which leads to a failure because the timeout is
20s. After the fix, the test stops failing
--
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]