From 049de167b6b8366418eda993cde30aaa84eba6ca Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Thu, 23 Sep 2010 23:02:30 +0200 Subject: added junit timeouts to CLGLTest (JOGL deadlock on mac) and CLCommandQueueTest --- test/com/jogamp/opencl/CLCommandQueueTest.java | 5 +++++ test/com/jogamp/opencl/gl/CLGLTest.java | 11 +++++++++++ 2 files changed, 16 insertions(+) (limited to 'test') diff --git a/test/com/jogamp/opencl/CLCommandQueueTest.java b/test/com/jogamp/opencl/CLCommandQueueTest.java index 89075c0f..d25d5aae 100644 --- a/test/com/jogamp/opencl/CLCommandQueueTest.java +++ b/test/com/jogamp/opencl/CLCommandQueueTest.java @@ -1,5 +1,8 @@ package com.jogamp.opencl; +import org.junit.Rule; +import org.junit.rules.MethodRule; +import org.junit.rules.Timeout; import java.util.concurrent.CountDownLatch; import com.jogamp.opencl.util.MultiQueueBarrier; import com.jogamp.opencl.CLCommandQueue.Mode; @@ -23,6 +26,8 @@ import static com.jogamp.common.nio.Buffers.*; */ public class CLCommandQueueTest { + @Rule + public MethodRule methodTimeout= new Timeout(20000); @Test public void enumsTest() { diff --git a/test/com/jogamp/opencl/gl/CLGLTest.java b/test/com/jogamp/opencl/gl/CLGLTest.java index f05c4d55..2c940aa8 100644 --- a/test/com/jogamp/opencl/gl/CLGLTest.java +++ b/test/com/jogamp/opencl/gl/CLGLTest.java @@ -4,6 +4,9 @@ package com.jogamp.opencl.gl; +import org.junit.Rule; +import org.junit.rules.MethodRule; +import org.junit.rules.Timeout; import com.jogamp.opencl.CLDevice; import com.jogamp.newt.Display; import com.jogamp.newt.NewtFactory; @@ -29,6 +32,9 @@ import static java.lang.System.*; */ public class CLGLTest { + @Rule + public MethodRule methodTimeout= new Timeout(5000); + private static GLContext glcontext; @BeforeClass @@ -95,6 +101,11 @@ public class CLGLTest { try{ out.println(context); + /* + CLDevice currentDevice = context.getCurrentGLCLDevice(); + assertNotNull(currentDevice); + out.println(currentDevice); + */ }finally{ context.release(); } -- cgit v1.2.3