Skip to content

Commit 4b2941d

Browse files
committedOct 10, 2022
8194126: Regression automated Test '/open/test/jdk/javax/swing/JColorChooser/Test7194184.java' fails
Backport-of: 0b3e6c5
1 parent a48bd87 commit 4b2941d

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed
 

‎test/jdk/ProblemList.txt

-1
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,6 @@ javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentJComboBox.java 802462
695695
# The next test below is an intermittent failure
696696
javax/swing/JComboBox/8033069/bug8033069ScrollBar.java 8163367 generic-all
697697
javax/swing/JColorChooser/Test6827032.java 8197825 windows-all
698-
javax/swing/JColorChooser/Test7194184.java 8194126 linux-all,macosx-all
699698
javax/swing/JSplitPane/4201995/bug4201995.java 8079127 generic-all
700699
javax/swing/JTree/DnD/LastNodeLowerHalfDrop.java 8159131 linux-all
701700
javax/swing/JTree/4633594/JTreeFocusTest.java 8173125 macosx-all

‎test/jdk/javax/swing/JColorChooser/Test7194184.java

+16-9
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,23 @@ public class Test7194184 {
5252
private static Robot robot;
5353

5454
public static void main(String[] args) throws Exception {
55-
robot = new Robot();
56-
robot.setAutoWaitForIdle(true);
57-
createUI();
58-
accessRecentSwatch();
59-
runRobot();
60-
testColorChooser();
61-
cleanUpUI();
55+
try {
56+
robot = new Robot();
57+
robot.setAutoDelay(100);
58+
createUI();
59+
robot.waitForIdle();
60+
robot.delay(1000);
61+
accessRecentSwatch();
62+
robot.waitForIdle();
63+
runRobot();
64+
testColorChooser();
65+
} finally {
66+
cleanUpUI();
67+
}
6268
}
6369

6470
private static void createUI() throws Exception {
65-
SwingUtilities.invokeLater(new Runnable() {
71+
SwingUtilities.invokeAndWait(new Runnable() {
6672
@Override
6773
public void run() {
6874
String title = getClass().getName();
@@ -71,12 +77,13 @@ public void run() {
7177
frame.add(colorChooser);
7278
frame.pack();
7379
frame.setVisible(true);
80+
frame.setLocationRelativeTo(null);
7481
}
7582
});
7683
}
7784

7885
private static void accessRecentSwatch() throws Exception {
79-
SwingUtilities.invokeLater(new Runnable() {
86+
SwingUtilities.invokeAndWait(new Runnable() {
8087
@Override
8188
public void run() {
8289
Component recentSwatchPanel = Util.findSubComponent(colorChooser, "RecentSwatchPanel");

1 commit comments

Comments
 (1)

openjdk-notifier[bot] commented on Oct 10, 2022

@openjdk-notifier[bot]
Please sign in to comment.