Skip to content

Commit

Permalink
Double duration of awaitFinalized in ShadowThemeTest
Browse files Browse the repository at this point in the history
Looks like shouldFreeNativeObjectInRegistry becomes flaky with JDK17
sometimes on GitHub Actions.

Signed-off-by: utzcoz <utzcoz@outlook.com>
  • Loading branch information
utzcoz committed Sep 23, 2023
1 parent 79def76 commit c6a97d6
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -301,7 +301,7 @@ public void shouldFreeNativeObjectInRegistry() {

private static <T> void awaitFinalized(WeakReference<T> weakRef) {
final CountDownLatch latch = new CountDownLatch(1);
long deadline = System.nanoTime() + TimeUnit.SECONDS.toNanos(5);
long deadline = System.nanoTime() + TimeUnit.SECONDS.toNanos(10);
while (System.nanoTime() < deadline) {
if (weakRef.get() == null) {
return;
Expand Down

0 comments on commit c6a97d6

Please sign in to comment.