Skip to content

Commit 3b10562

Browse files
author
Jose Pereda
committedAug 16, 2023
8314266: Several test failures after fix for JDK-8159048
Reviewed-by: kcr
1 parent 9e9c3b3 commit 3b10562

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed
 

‎modules/javafx.web/src/test/java/test/javafx/scene/web/LeakTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import java.util.concurrent.CountDownLatch;
3535
import javafx.animation.KeyFrame;
3636
import javafx.animation.Timeline;
37+
import javafx.application.Platform;
3738
import javafx.concurrent.Worker.State;
3839
import javafx.event.ActionEvent;
3940
import javafx.event.EventHandler;
@@ -74,7 +75,7 @@ public class LeakTest extends TestBase {
7475
}
7576
}
7677
}));
77-
time.play();
78+
Platform.runLater(time::play);
7879
latch.await();
7980
}
8081

‎tests/system/src/test/java/test/javafx/application/PlatformTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public void testCanNotStartNestedEventLoopInTimeline() {
120120
timelineDone.countDown();
121121
}
122122
}));
123-
timeline.play();
123+
Platform.runLater(timeline::play);
124124

125125
Util.await(timelineDone);
126126

‎tests/system/src/test/java/test/javafx/stage/ShowAndWaitTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -683,7 +683,7 @@ public void testTimeline() throws Throwable {
683683
animationDone.countDown();
684684
});
685685
Timeline timeline = new Timeline(kf);
686-
timeline.play();
686+
Platform.runLater(timeline::play);
687687

688688
try {
689689
if (!animationDone.await(TIMEOUT, TimeUnit.MILLISECONDS)) {
@@ -733,7 +733,7 @@ public void testTimelineDialog() throws Throwable {
733733
animationDone.countDown();
734734
});
735735
Timeline timeline = new Timeline(kf);
736-
timeline.play();
736+
Platform.runLater(timeline::play);
737737

738738
try {
739739
if (!animationDone.await(TIMEOUT, TimeUnit.MILLISECONDS)) {
@@ -788,7 +788,7 @@ public void testTimelinePrint() throws Throwable {
788788
animationDone.countDown();
789789
});
790790
Timeline timeline = new Timeline(kf);
791-
timeline.play();
791+
Platform.runLater(timeline::play);
792792

793793
try {
794794
if (!animationDone.await(TIMEOUT, TimeUnit.MILLISECONDS)) {

0 commit comments

Comments
 (0)
Please sign in to comment.