We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7266c0b commit 0333c12Copy full SHA for 0333c12
approvaltests-util-tests/src/test/java/org/lambda/utils/OnceTest.java
@@ -47,21 +47,21 @@ private void incrementNormal()
47
Once.run(() -> globals[1]++);
48
}
49
@Test
50
- @Timeout(unit = TimeUnit.MILLISECONDS, value = 600)
+ @Timeout(unit = TimeUnit.SECONDS, value = 1)
51
void testOnceAsync()
52
{
53
incrementAsync();
54
55
56
57
58
- ThreadUtils.sleep(500);
+ ThreadUtils.sleep(750);
59
assertEquals(1, globals[2]);
60
61
private void incrementAsync()
62
63
Once.runAsync(() -> {
64
- ThreadUtils.sleep(300);
+ ThreadUtils.sleep(500);
65
globals[2]++;
66
});
67
0 commit comments