Skip to content

Commit

Permalink
see if we managed to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
torakiki committed Nov 25, 2022
1 parent 8841a28 commit e23c746
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Expand Up @@ -33,12 +33,11 @@
import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.TimeoutException;

import static java.time.Duration.ofSeconds;
import static org.awaitility.Awaitility.await;
import static org.hibernate.validator.internal.util.Contracts.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

/**
* @author Andrea Vacondio
Expand Down
Expand Up @@ -22,6 +22,7 @@
import org.junit.jupiter.api.extension.Extension;

import javax.swing.SwingUtilities;
import java.lang.reflect.InvocationTargetException;

/**
* @author Andrea Vacondio
Expand All @@ -30,7 +31,12 @@ public class JavaFxThreadInitializeExtension implements Extension {

static {
System.out.println("Initializing JavaFX thread");
SwingUtilities.invokeLater(JFXPanel::new);
try {
SwingUtilities.invokeAndWait(JFXPanel::new);
} catch (InterruptedException | InvocationTargetException e) {
System.out.println("Unable to initialize JavaFX thread");
throw new RuntimeException(e);
}
System.out.println("JavaFX initialized");
}
}

0 comments on commit e23c746

Please sign in to comment.