From cecc00efb3c47928dd8080577645b2d8633fa159 Mon Sep 17 00:00:00 2001
From: Sven Gothel
Date: Sat, 20 Sep 2014 22:32:26 +0200
Subject: TestInitConcurrent*NEWT: Decorated tests w/ GLProfile.shutdown(),
ensuring implicit GLProfile.initSingleton() is being tested
---
.../opengl/test/junit/jogl/acore/InitConcurrentBaseNEWT.java | 6 ++++++
.../opengl/test/junit/jogl/acore/TestInitConcurrent01NEWT.java | 6 ++++++
.../opengl/test/junit/jogl/acore/TestInitConcurrent02NEWT.java | 8 +++++++-
3 files changed, 19 insertions(+), 1 deletion(-)
(limited to 'src/test/com')
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;
*
* Rendering is always lock-free and independent of the EDT.
*
+ *
+ * Each test is decorated w/ {@link GLProfile#shutdown()} to ensure that
+ * implicit {@link GLProfile#initSingleton()} is also being tested.
+ *
*/
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.
*
+ *
+ * Each test is decorated w/ {@link GLProfile#shutdown()} to ensure that
+ * implicit {@link GLProfile#initSingleton()} is also being tested.
+ *
*/
@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.
*
- * 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.
*
+ *
+ * Each test is decorated w/ {@link GLProfile#shutdown()} to ensure that
+ * implicit {@link GLProfile#initSingleton()} is also being tested.
+ *
*/
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestInitConcurrent02NEWT extends InitConcurrentBaseNEWT {
--
cgit v1.2.3