aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-09-20 22:32:26 +0200
committerSven Gothel <[email protected]>2014-09-20 22:32:26 +0200
commitcecc00efb3c47928dd8080577645b2d8633fa159 (patch)
treeca38510d92118ed97a4508bc7bd992e0853d98be
parentb8f9db9250ab2f5aa43eebae5f4637c01bbc2ce4 (diff)
TestInitConcurrent*NEWT: Decorated tests w/ GLProfile.shutdown(), ensuring implicit GLProfile.initSingleton() is being tested
-rw-r--r--make/scripts/tests.sh4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/InitConcurrentBaseNEWT.java6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent01NEWT.java6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent02NEWT.java8
4 files changed, 21 insertions, 3 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index b5dcbac9f..2fe9caadd 100644
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -477,7 +477,7 @@ function testawtswt() {
#testnoawt com.jogamp.opengl.test.junit.jogl.math.TestQuaternion01NOUI $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestShutdownCompleteNEWT $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestInitConcurrent01NEWT $*
+testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestInitConcurrent01NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestInitConcurrent02NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLContextSurfaceLockNEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLDebug00NEWT $*
@@ -676,7 +676,7 @@ function testawtswt() {
#testawt com.jogamp.opengl.test.junit.jogl.awt.TestGLJPanelResize01AWT $*
#testawt com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.Bug818GLJPanelAndGLCanvasApplet $*
-testawt com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.GLJPanelsAndGLCanvasDemoGL2Applet $*
+#testawt com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.GLJPanelsAndGLCanvasDemoGL2Applet $*
#testawt com.jogamp.opengl.test.bugs.Bug735Inv0AppletAWT $*
#testawt com.jogamp.opengl.test.bugs.Bug735Inv1AppletAWT $*
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/InitConcurrentBaseNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/InitConcurrentBaseNEWT.java
index eb9203b75..6bfe73e95 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/InitConcurrentBaseNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/InitConcurrentBaseNEWT.java
@@ -52,6 +52,10 @@ import com.jogamp.opengl.util.Animator;
* <p>
* Rendering is always lock-free and independent of the EDT.
* </p>
+ * <p>
+ * Each test is decorated w/ {@link GLProfile#shutdown()} to ensure that
+ * implicit {@link GLProfile#initSingleton()} is also being tested.
+ * </p>
*/
public abstract class InitConcurrentBaseNEWT extends UITestCase {
@@ -185,6 +189,7 @@ public abstract class InitConcurrentBaseNEWT extends UITestCase {
}
protected void runJOGLTasks(final int num, final boolean reuse) throws InterruptedException {
+ GLProfile.shutdown();
System.err.println("InitConcurrentBaseNEWT "+num+" threads, reuse display: "+reuse);
final String currentThreadName = Thread.currentThread().getName();
final Object syncDone = new Object();
@@ -222,5 +227,6 @@ public abstract class InitConcurrentBaseNEWT extends UITestCase {
i++;
}
Assert.assertTrue("Threads are still alive after 3s. Alive: "+isAliveDump(threads), isDead(threads));
+ GLProfile.shutdown();
}
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent01NEWT.java
index 2fc3071c6..a3c5d44cd 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent01NEWT.java
@@ -30,6 +30,8 @@ package com.jogamp.opengl.test.junit.jogl.acore;
import java.io.IOException;
+import javax.media.opengl.GLProfile;
+
import org.junit.Test;
import org.junit.FixMethodOrder;
import org.junit.runners.MethodSorters;
@@ -42,6 +44,10 @@ import com.jogamp.common.os.Platform;
* Rendering is always lock-free and independent of the EDT, however shared NEWT Display instances
* perform lifecycle actions (window creation etc) with locking.
* </p>
+ * <p>
+ * Each test is decorated w/ {@link GLProfile#shutdown()} to ensure that
+ * implicit {@link GLProfile#initSingleton()} is also being tested.
+ * </p>
*/
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestInitConcurrent01NEWT extends InitConcurrentBaseNEWT {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent02NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent02NEWT.java
index 71796e5c2..5cbf15b57 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent02NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent02NEWT.java
@@ -30,6 +30,8 @@ package com.jogamp.opengl.test.junit.jogl.acore;
import java.io.IOException;
+import javax.media.opengl.GLProfile;
+
import org.junit.Test;
import org.junit.FixMethodOrder;
import org.junit.runners.MethodSorters;
@@ -39,9 +41,13 @@ import com.jogamp.common.os.Platform;
/**
* Concurrent and lock-free initialization and rendering using exclusive NEWT Display EDT instances.
* <p>
- * Rendering is always lock-free and independent of the EDT, however exclusive NEWT Display instances
+ * Rendering is always lock-free and independent of the EDT, using exclusive NEWT Display instances
* perform lifecycle actions (window creation etc) w/o locking.
* </p>
+ * <p>
+ * Each test is decorated w/ {@link GLProfile#shutdown()} to ensure that
+ * implicit {@link GLProfile#initSingleton()} is also being tested.
+ * </p>
*/
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestInitConcurrent02NEWT extends InitConcurrentBaseNEWT {