diff options
author | Sven Gothel <[email protected]> | 2013-09-06 23:46:13 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-09-06 23:46:13 +0200 |
commit | 27c4a837580c7a68582e852d5ff64f733e669509 (patch) | |
tree | 880c0111e101f999ede94461f7e49a17fec5b62e | |
parent | b780eff49b626bd8429e1e87609f7a917f7b094e (diff) |
TestTiledPrintingGears*AWT: Add 4s delay before closing frame and ending unit test to wait for print-job (?)
.. otherwise results are cut-off .. better solution ? callback ?
3 files changed, 5 insertions, 9 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsAWT.java index 30967d75b..511880a0d 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsAWT.java @@ -160,10 +160,8 @@ public class TestTiledPrintingGearsAWT extends TiledPrintingAWTBase { doPrintAuto(frame, glCanvas, TestTiledPrintingGearsAWT.this, PageFormat.LANDSCAPE, null, offscreenPrinting, 300); } } - - try { - Thread.sleep(1000); // time to flush .. - } catch (InterruptedException e) { } + try { Thread.sleep(4000); } catch (InterruptedException e) { } // time to finish print jobs .. FIXME ?? + Assert.assertNotNull(frame); Assert.assertNotNull(glCanvas); Assert.assertNotNull(animator); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsSwingAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsSwingAWT.java index 260c9e04c..444f6c5a5 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsSwingAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TestTiledPrintingGearsSwingAWT.java @@ -160,17 +160,14 @@ public class TestTiledPrintingGearsSwingAWT extends TiledPrintingAWTBase { Thread.sleep(200); if( !dpi72Done ) { dpi72Done = true; - System.err.println("XXX "+glJPanel); doPrintAuto(frame, glJPanel, TestTiledPrintingGearsSwingAWT.this, PageFormat.LANDSCAPE, null, offscreenPrinting, 72); } else if( !dpi300Done ) { dpi300Done = true; doPrintAuto(frame, glJPanel, TestTiledPrintingGearsSwingAWT.this, PageFormat.LANDSCAPE, null, offscreenPrinting, 300); } } - - try { - Thread.sleep(1000); // time to flush .. - } catch (InterruptedException e) { } + try { Thread.sleep(4000); } catch (InterruptedException e) { } // time to finish print jobs .. FIXME ?? + Assert.assertNotNull(frame); Assert.assertNotNull(glJPanel); Assert.assertNotNull(animator); diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java index 80268b07c..73c1b3dfb 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java @@ -248,6 +248,7 @@ public abstract class TiledPrintingAWTBase extends UITestCase implements Printab } catch (FileNotFoundException e) { Assert.assertNull("Unexpected exception", e); } + return; } System.err.println("No PS"); } |