Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 23dc447

Browse files
authored
[Dataflow] Fix flaky BoundedQueueExecutor test (#34878)
1 parent 63242c9 commit 23dc447

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/util/BoundedQueueExecutorTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,10 @@ public void testScheduleWorkWhenExceedMaximumBytesOutstanding() throws Exception
172172

173173
// Stop m1 so there are available bytes for m2 to run.
174174
processStop1.countDown();
175+
// m2 should be able to start execution
175176
processStart2.await();
176-
// m2 started.
177-
assertEquals(Thread.State.TERMINATED, m2Runner.getState());
177+
// ensure that the execute() call scheduling m2 returns even if the completion of m2 is blocked.
178+
m2Runner.join();
178179
processStop2.countDown();
179180
executor.shutdown();
180181
}

0 commit comments

Comments
 (0)