rzo1 commented on code in PR #1973:
URL: https://github.com/apache/stormcrawler/pull/1973#discussion_r3527236512
##########
external/urlfrontier/src/test/java/org/apache/stormcrawler/urlfrontier/HostBlockBoltTest.java:
##########
@@ -151,10 +158,18 @@ void blocksHostQueueUntilTime() {
when(t.getValueByField("metadata")).thenReturn(md);
bolt.execute(t);
- // while blocked, getURLs must not return the host
- await().atMost(15, TimeUnit.SECONDS).until(() ->
!keysFromGetURLs().contains(HOST));
-
- // unblock (a past time releases the queue) and the host becomes
available again
+ // give the fire-and-forget RPC time to land before polling: getURLs
+ // must never hand the URL out. Polling before the block is effective
+ // would put the URL in-flight and make the assertion below pass even
+ // without a block
+ Thread.sleep(2000);
Review Comment:
Can we use awaitability instead of Thread.sleep?
--
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]