changeset 6426:a080ea040a9c

[TEST-ONLY] change TestBase to initialize toolkit in @BeforeClass method Summary: This change matches what we do elsewhere and avoids waiting in the static block which will deadlock whenn we change to using lambdas (see JDK-8036728)
author kcr
date Wed, 05 Mar 2014 10:36:02 -0800
parents b9b901417181
children cbb89489baea
files modules/web/src/test/java/javafx/scene/web/TestBase.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/web/src/test/java/javafx/scene/web/TestBase.java	Wed Mar 05 10:04:40 2014 +0100
+++ b/modules/web/src/test/java/javafx/scene/web/TestBase.java	Wed Mar 05 10:36:02 2014 -0800
@@ -18,6 +18,7 @@
 
 import com.sun.javafx.application.PlatformImpl;
 import java.util.concurrent.ExecutionException;
+import org.junit.BeforeClass;
 import org.w3c.dom.Document;
 
 public class TestBase implements ChangeListener, InvalidationListener {
@@ -27,7 +28,8 @@
 
     private static WebView view;
 
-    static {
+    @BeforeClass
+    public static void setupOnce() {
         final CountDownLatch startupLatch = new CountDownLatch(1);
 
         PlatformImpl.startup(new Runnable() {