Skip to content

Commit 0a805ae

Browse files
authored
make testThreadsAreAddedOnlyAsNeededWithContention more robust (#35045)
1 parent 0c33b6d commit 0a805ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sdks/java/core/src/test/java/org/apache/beam/sdk/util/UnboundedScheduledExecutorServiceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,13 +527,13 @@ public void testThreadsAreAddedOnlyAsNeededWithContention() throws Exception {
527527
} catch (InterruptedException e) {
528528
throw new RuntimeException(e);
529529
}
530-
for (int j = 0; j < 1000; ++j) {
530+
for (int j = 0; j < 200; ++j) {
531531
try {
532532
executorService
533533
.submit(
534534
() -> {
535535
try {
536-
Thread.sleep(1);
536+
Thread.sleep(5);
537537
} catch (InterruptedException e) {
538538
throw new RuntimeException(e);
539539
}

0 commit comments

Comments
 (0)