7077412: [TEST_BUG]closed/java/awt/print/PrinterJob/PaintText.java failed (timeout error)
authorpsadhukhan
Tue, 27 Oct 2015 14:14:08 +0300
changeset 33850 b2791736fcb3
parent 33515 3cc974283705
child 33851 8c60451ba63a
7077412: [TEST_BUG]closed/java/awt/print/PrinterJob/PaintText.java failed (timeout error) Reviewed-by: azvegint, serb
jdk/test/java/awt/print/PrinterJob/PaintText.java
--- a/jdk/test/java/awt/print/PrinterJob/PaintText.java	Fri Oct 23 10:50:34 2015 -0700
+++ b/jdk/test/java/awt/print/PrinterJob/PaintText.java	Tue Oct 27 14:14:08 2015 +0300
@@ -75,8 +75,8 @@
         f.show();
 
         /* Non-jtreg execution will display the dialog */
-        if (System.getProperty("test.java") == null) {
-             if (!pjob.printDialog()) {
+        if (System.getProperty("test.jdk") == null) {
+            if (!pjob.printDialog()) {
                 return;
             }
         }
@@ -84,6 +84,8 @@
             pjob.print();
         } catch (PrinterException e) {
             throw new RuntimeException(e.getMessage());
+        } finally {
+            f.dispose();
         }
     }