From f71abdf19bdcf3ccfcc5455cb15aff4e93d468bb Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 21 Jan 2023 04:15:35 +0100 Subject: TestSharedContextVBOES2NEWT5: Try harder having the objects destroyed and taken from the GLContextShareSet map The objects were more sticky on my MacOS 12 x86_64 machine, this double GC w/ sleep 100ms resolved it. --- .../test/junit/jogl/acore/TestSharedContextVBOES2NEWT5.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT5.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT5.java index 4380b2dc5..8317bb0c1 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT5.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT5.java @@ -204,7 +204,13 @@ public class TestSharedContextVBOES2NEWT5 extends UITestCase { sf[i] = null; sc[i] = null; } - System.gc(); + { + // Ensure nulled objects got destroyed and taken from the GLContextShareSet map. + System.gc(); + try { Thread.sleep(100); } catch (final InterruptedException ie) {} + System.gc(); + try { Thread.sleep(100); } catch (final InterruptedException ie) {} + } System.err.println("XXX-"+j+"-X-SX2 - GLContextShareSet.Map"); GLContextShareSet.printMap(System.err); Assert.assertEquals("GLContextShareSet ctx1.createdCount is not 1", 1, GLContextShareSet.getCreatedShareCount(ctx1)); -- cgit v1.2.3