m-trieu commented on code in PR #34283:
URL: https://github.com/apache/beam/pull/34283#discussion_r2023491485
##########
runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/windmill/client/AbstractWindmillStreamTest.java:
##########
@@ -197,18 +202,37 @@ protected void shutdownInternal() {}
}
private static class TestCallStreamObserver extends
CallStreamObserver<Integer> {
+ private static final Logger LOG =
LoggerFactory.getLogger(AbstractWindmillStreamTest.class);
private final CountDownLatch sendBlocker = new CountDownLatch(1);
+ private final boolean waitForSend;
+
+ private TestCallStreamObserver(boolean waitForSend) {
+ this.waitForSend = waitForSend;
+ }
+
private void unblockSend() {
sendBlocker.countDown();
}
- @Override
- public void onNext(Integer integer) {
+ private void waitForSend() {
try {
- sendBlocker.await();
+ int waitedMillis = 0;
+ while (!sendBlocker.await(100, TimeUnit.MILLISECONDS)) {
+ waitedMillis += 100;
+ LOG.info("Waiting from send for {}ms", waitedMillis);
Review Comment:
done
--
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]