diff options
author | Sven Gothel <[email protected]> | 2014-09-20 22:32:26 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-09-20 22:32:26 +0200 |
commit | cecc00efb3c47928dd8080577645b2d8633fa159 (patch) | |
tree | ca38510d92118ed97a4508bc7bd992e0853d98be /src | |
parent | b8f9db9250ab2f5aa43eebae5f4637c01bbc2ce4 (diff) |
TestInitConcurrent*NEWT: Decorated tests w/ GLProfile.shutdown(), ensuring implicit GLProfile.initSingleton() is being tested
Diffstat (limited to 'src')
3 files changed, 19 insertions, 1 deletions
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 { |