From 94a925b4f303f0abb92accd922907feacb86150f Mon Sep 17 00:00:00 2001 From: Pankaj Bansal Date: Mon, 25 Sep 2017 15:57:43 +0530 Subject: [PATCH] 6857809: [TEST_BUG] java/awt/Component/PrintAllXcheckJNI/PrintAllXcheckJNI.java fails in jdk7 b64 pit build Co-authored-by: Dmitry Cherepanov Reviewed-by: serb, ssadetsky --- .../Component/PrintAllXcheckJNI/PrintAllXcheckJNI.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/jdk/java/awt/Component/PrintAllXcheckJNI/PrintAllXcheckJNI.java b/test/jdk/java/awt/Component/PrintAllXcheckJNI/PrintAllXcheckJNI.java index a4d8edc4808..d171964087e 100644 --- a/test/jdk/java/awt/Component/PrintAllXcheckJNI/PrintAllXcheckJNI.java +++ b/test/jdk/java/awt/Component/PrintAllXcheckJNI/PrintAllXcheckJNI.java @@ -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(),