From 674004cd67105b27b63c7ac2f05738f21864bdc0 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 16 Feb 2013 20:10:23 +0100 Subject: TestWindowClosingProtocol01AWT: More relaxed timing reducing false positives --- .../opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java | 10 +++++++++- .../test/junit/newt/TestWindowClosingProtocol02NEWT.java | 2 ++ .../test/junit/newt/TestWindowClosingProtocol03NewtAWT.java | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) (limited to 'src/test') diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java index 3a923d435..6aedb8433 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java @@ -87,10 +87,16 @@ public class TestWindowClosingProtocol01AWT extends UITestCase { glCanvas.setDefaultCloseOperation(WindowClosingMode.DISPOSE_ON_CLOSE); op = glCanvas.getDefaultCloseOperation(); Assert.assertEquals(WindowClosingMode.DISPOSE_ON_CLOSE, op); + + Thread.sleep(300); - Assert.assertEquals(true, AWTRobotUtil.closeWindow(frame, false)); // no frame close + Assert.assertEquals(true, AWTRobotUtil.closeWindow(frame, false)); // no frame close, but GLCanvas's GL resources will be destroyed + Thread.sleep(100); Assert.assertEquals(true, frame.isDisplayable()); Assert.assertEquals(true, frame.isVisible()); + for (int wait=0; wait