dpol1 commented on code in PR #2225:
URL: https://github.com/apache/stormcrawler/pull/2225#discussion_r4208766236
##########
external/opensearch-java/src/test/java/org/apache/stormcrawler/opensearch/AsyncBulkProcessorTest.java:
##########
@@ -238,4 +247,50 @@ public void afterBulk(
assertTrue(closed, "awaitClose should return true");
assertEquals(1, totalBulkCalls.get(), "buffered operations should have
been flushed");
}
+
+ /**
+ * Verify that the calling thread does not wait for the HTTP round trip:
adding operations while
+ * a bulk request is in flight only blocks once all the permits are taken.
+ */
+ @Test
+ @Timeout(10)
+ void addDoesNotWaitForBulkResponse() throws Exception {
Review Comment:
One optional follow-up: I have a small regression test that holds
`afterBulk` on a latch and checks that a second `add()` waits. It catches the
permit release moving back before the callback. Happy to contribute it.
--
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]