changeset 47522:9318793bdc36

6857809: [TEST_BUG] java/awt/Component/PrintAllXcheckJNI/PrintAllXcheckJNI.java fails in jdk7 b64 pit build Reviewed-by: serb, ssadetsky Contributed-by: pankaj.b.bansal@oracle.com, dcherepanov@azul.com
author aghaisas
date Mon, 25 Sep 2017 15:57:43 +0530
parents 099d4d178224
children 370a8cb82546
files test/jdk/java/awt/Component/PrintAllXcheckJNI/PrintAllXcheckJNI.java
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/jdk/java/awt/Component/PrintAllXcheckJNI/PrintAllXcheckJNI.java	Fri Sep 22 18:57:05 2017 -0700
+++ b/test/jdk/java/awt/Component/PrintAllXcheckJNI/PrintAllXcheckJNI.java	Mon Sep 25 15:57:43 2017 +0530
@@ -26,19 +26,25 @@
   @key headful
   @bug 6736247
   @summary Component.printAll Invalid local JNI handle
+  @library ../../regtesthelpers
+  @build Util
   @author Dmitry Cherepanov: area=awt.component
   @run  main/othervm -Xcheck:jni PrintAllXcheckJNI
 */
 
-import java.awt.*;
+import java.awt.Frame;
+import java.awt.Graphics2D;
 import java.awt.image.BufferedImage;
+import test.java.awt.regtesthelpers.Util;
 
 public class PrintAllXcheckJNI
 {
     public static void main(String []s)
     {
         Frame frame = new Frame();
+        frame.setBounds(100, 100, 100, 100);
         frame.setVisible(true);
+        Util.waitForIdle(Util.createRobot());
 
         BufferedImage img = new BufferedImage(frame.getWidth(),
                                               frame.getHeight(),