Skip to content

Commit 0333c12

Browse files
LarsEckartJayBazuziisidore
committed
- t reduce likelihood of flaky test
Co-authored-by: Jay Bazuzi <[email protected]> Co-authored-by: Llewellyn Falco <[email protected]>
1 parent 7266c0b commit 0333c12

File tree

1 file changed

+3
-3
lines changed
  • approvaltests-util-tests/src/test/java/org/lambda/utils

1 file changed

+3
-3
lines changed

approvaltests-util-tests/src/test/java/org/lambda/utils/OnceTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,21 @@ private void incrementNormal()
4747
Once.run(() -> globals[1]++);
4848
}
4949
@Test
50-
@Timeout(unit = TimeUnit.MILLISECONDS, value = 600)
50+
@Timeout(unit = TimeUnit.SECONDS, value = 1)
5151
void testOnceAsync()
5252
{
5353
incrementAsync();
5454
incrementAsync();
5555
incrementAsync();
5656
incrementAsync();
5757
incrementAsync();
58-
ThreadUtils.sleep(500);
58+
ThreadUtils.sleep(750);
5959
assertEquals(1, globals[2]);
6060
}
6161
private void incrementAsync()
6262
{
6363
Once.runAsync(() -> {
64-
ThreadUtils.sleep(300);
64+
ThreadUtils.sleep(500);
6565
globals[2]++;
6666
});
6767
}

0 commit comments

Comments
 (0)