This is an automated email from the ASF dual-hosted git repository. jtulach pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git
commit cde21aee2cb6c8c16cb5fb47fd2be5d0a0ef7a79 Author: Jaroslav Tulach <[email protected]> AuthorDate: Wed Jan 2 13:07:48 2019 +0100 Make sure the tests fail in timely manner on JDK11 --- .../unit/src/org/netbeans/modules/htmlui/ComponentsTest.java | 6 ++++-- .../unit/src/org/netbeans/modules/htmlui/DialogsTest.java | 8 +++++--- .../src/org/netbeans/modules/htmlui/FreeGeoProviderTest.java | 4 ++-- .../src/org/netbeans/modules/htmlui/HtmlComponentTest.java | 12 ++++++++---- .../netbeans/modules/htmlui/OpenHTMLRegistrationTest.java | 3 ++- .../org/netbeans/modules/htmlui/ShowDialogFromEDTTest.java | 4 +++- .../netbeans/modules/htmlui/ShowDialogFromFXThreadTest.java | 7 +++++-- 7 files changed, 29 insertions(+), 15 deletions(-) diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ComponentsTest.java b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ComponentsTest.java index 3267b20..65cdc51 100644 --- a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ComponentsTest.java +++ b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ComponentsTest.java @@ -45,7 +45,8 @@ public class ComponentsTest { NbResloc.init(); } - @Test public void loadSwing() throws Exception { + @Test(timeOut = 9000) + public void loadSwing() throws Exception { CountDownLatch cdl = new CountDownLatch(1); JComponent p = TestPages.getSwing(10, cdl); JFrame f = new JFrame(); @@ -55,7 +56,8 @@ public class ComponentsTest { cdl.await(); } - @Test public void loadFX() throws Exception { + @Test(timeOut = 9000) + public void loadFX() throws Exception { final CountDownLatch cdl = new CountDownLatch(1); final CountDownLatch done = new CountDownLatch(1); final JFXPanel p = new JFXPanel(); diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/DialogsTest.java b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/DialogsTest.java index 1af3a51..aeabeca 100644 --- a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/DialogsTest.java +++ b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/DialogsTest.java @@ -45,7 +45,7 @@ public class DialogsTest { public DialogsTest() { } - @BeforeClass + @BeforeClass(timeOut = 9000) public static void initializeContext() throws Exception { final JFXPanel p = new JFXPanel(); final URL u = DialogsTest.class.getResource("/org/netbeans/api/htmlui/empty.html"); @@ -71,7 +71,8 @@ public class DialogsTest { f.setVisible(true); } - @Test public void parseButtons() throws Throwable { + @Test(timeOut = 9000) + public void parseButtons() throws Throwable { final Throwable[] ex = { null }; final JButton[] buttons = { null, null }; final CountDownLatch done = new CountDownLatch(1); @@ -122,7 +123,8 @@ public class DialogsTest { }); } - @Test public void noDefinedButtonsMeanOKCancel() throws Throwable { + @Test(timeOut = 9000) + public void noDefinedButtonsMeanOKCancel() throws Throwable { final Throwable[] ex = { null }; final CountDownLatch done = new CountDownLatch(1); ctx.execute(new Runnable() { diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/FreeGeoProviderTest.java b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/FreeGeoProviderTest.java index c1b9123..1acdde4 100644 --- a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/FreeGeoProviderTest.java +++ b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/FreeGeoProviderTest.java @@ -41,7 +41,7 @@ public class FreeGeoProviderTest { private Position position; private Exception error; - @BeforeClass + @BeforeClass(timeOut = 9000) public static void initializeContext() throws Exception { final JFXPanel p = new JFXPanel(); final URL u = DialogsTest.class.getResource("/org/netbeans/api/htmlui/empty.html"); @@ -68,7 +68,7 @@ public class FreeGeoProviderTest { } - @Test + @Test(timeOut = 9000) public void checkGeoLocation() throws InterruptedException { ctx.execute(new Runnable() { @Override diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/HtmlComponentTest.java b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/HtmlComponentTest.java index 6ddda5b..11e13f9 100644 --- a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/HtmlComponentTest.java +++ b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/HtmlComponentTest.java @@ -46,7 +46,8 @@ public class HtmlComponentTest { public HtmlComponentTest() { } - @BeforeClass public static void initializeContext() throws Exception { + @BeforeClass(timeOut = 9000) + public static void initializeContext() throws Exception { final HtmlComponent tc = new HtmlComponent(); final URL u = HtmlComponent.class.getResource("/org/netbeans/api/htmlui/empty.html"); Platform.runLater(new Runnable() { @@ -65,7 +66,8 @@ public class HtmlComponentTest { return cc; } - @Test public void updateContext() throws Exception { + @Test(timeOut = 9000) + public void updateContext() throws Exception { CheckContext cc = assertContext(); assertNull(lkp.lookup(DefCnstr.class), "No instance yet"); @@ -77,7 +79,8 @@ public class HtmlComponentTest { assertNull(lkp.lookup(DefCnstr.class), "Disappeared again"); } - @Test public void closedWhenRemoved() throws Exception { + @Test(timeOut = 9000) + public void closedWhenRemoved() throws Exception { CheckContext cc = assertContext(); cc.addContext(ClsblCnstr.class.getName()); @@ -91,7 +94,8 @@ public class HtmlComponentTest { assertTrue(inst.closed, "Close has been called on removal"); } - @Test public void updateContextWithNonDefaultCnstr() throws Exception { + @Test(timeOut = 9000) + public void updateContextWithNonDefaultCnstr() throws Exception { CheckContext cc = assertContext(); assertNull(lkp.lookup(MdlCnstr.class), "No instance yet"); diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/OpenHTMLRegistrationTest.java b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/OpenHTMLRegistrationTest.java index 9df5fc2..aca0397 100644 --- a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/OpenHTMLRegistrationTest.java +++ b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/OpenHTMLRegistrationTest.java @@ -46,7 +46,8 @@ public class OpenHTMLRegistrationTest { public static void main() { } - @Test public void verifyRegistered() { + @Test(timeOut = 9000) + public void verifyRegistered() { final String path = "Actions/Test/html-test.instance"; final FileObject fo = FileUtil.getConfigFile(path); assertNotNull(fo, "Registration found"); diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ShowDialogFromEDTTest.java b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ShowDialogFromEDTTest.java index d3cba7a..4b1387e 100644 --- a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ShowDialogFromEDTTest.java +++ b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ShowDialogFromEDTTest.java @@ -34,7 +34,9 @@ public class ShowDialogFromEDTTest implements Runnable { } private CountDownLatch cdl; - @Test public void showDialog() throws InterruptedException { + + @Test(timeOut = 9000) + public void showDialog() throws InterruptedException { cdl = new CountDownLatch(1); EventQueue.invokeLater(this); cdl.await(); diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ShowDialogFromFXThreadTest.java b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ShowDialogFromFXThreadTest.java index 9caf844..b67d5cc 100644 --- a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ShowDialogFromFXThreadTest.java +++ b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ShowDialogFromFXThreadTest.java @@ -36,7 +36,8 @@ import org.testng.annotations.Test; public class ShowDialogFromFXThreadTest implements Runnable { private volatile boolean returned; - @BeforeClass public static void initFX() { + @BeforeClass(timeOut = 9000) + public static void initFX() { JFXPanel p = new JFXPanel(); JFrame f = new JFrame(); f.getContentPane().add(p); @@ -49,7 +50,9 @@ public class ShowDialogFromFXThreadTest implements Runnable { private volatile CountDownLatch cdl; - @Test public void showDialog() throws Exception { + + @Test(timeOut = 9000) + public void showDialog() throws Exception { cdl = new CountDownLatch(1); Platform.runLater(this); cdl.await(); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
