changeset 14588:8e4b93a5a036

7077412: [TEST_BUG]closed/java/awt/print/PrinterJob/PaintText.java failed (timeout error) Reviewed-by: azvegint, serb
author psadhukhan
date Tue, 27 Oct 2015 14:14:08 +0300
parents 8bf32c4c2332
children dfeaf40df800
files test/java/awt/print/PrinterJob/PaintText.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/awt/print/PrinterJob/PaintText.java	Fri Oct 23 10:50:34 2015 -0700
+++ b/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();
         }
     }