m-trieu commented on code in PR #30322:
URL: https://github.com/apache/beam/pull/30322#discussion_r1491633909
##########
runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/windmill/client/grpc/StreamingEngineClientTest.java:
##########
@@ -412,10 +428,22 @@ private void close() {
}
private static class TestGetWorkBudgetDistributor implements
GetWorkBudgetDistributor {
+ private final CountDownLatch getWorkBudgetDistributorTriggered;
+
+ private TestGetWorkBudgetDistributor(int numBudgetDistributionsExpected) {
+ this.getWorkBudgetDistributorTriggered = new
CountDownLatch(numBudgetDistributionsExpected);
+ }
+
+ @SuppressWarnings("ReturnValueIgnored")
+ private void waitForBudgetDistribution() throws InterruptedException {
+ getWorkBudgetDistributorTriggered.await(5, TimeUnit.SECONDS);
+ }
+
@Override
public void distributeBudget(
ImmutableCollection<WindmillStreamSender> streams, GetWorkBudget
getWorkBudget) {
streams.forEach(stream -> stream.adjustBudget(getWorkBudget.items(),
getWorkBudget.bytes()));
+ getWorkBudgetDistributorTriggered.countDown();
Review Comment:
are these tests run on multiple threads in the GHA env?
are the @Before and @After code blocks not being run?
--
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]