# HG changeset patch # User serb # Date 1395331198 -14400 # Node ID 2d5bf8043a3810dc7080fb9d6440299b06c876e0 # Parent ab1324996bc70f6475380225be95403410d36624 8023475: [TEST BUG] Test javax/swing/JSlider/6794831/bug6794831.java does not wait long enough for test results Reviewed-by: anthony, pchelko diff -r ab1324996bc7 -r 2d5bf8043a38 jdk/test/javax/swing/JSlider/6794831/bug6794831.java --- a/jdk/test/javax/swing/JSlider/6794831/bug6794831.java Thu Mar 20 17:34:27 2014 +0400 +++ b/jdk/test/javax/swing/JSlider/6794831/bug6794831.java Thu Mar 20 19:59:58 2014 +0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,18 +31,20 @@ import javax.swing.*; import javax.swing.plaf.basic.BasicSliderUI; import java.awt.image.BufferedImage; +import java.lang.reflect.InvocationTargetException; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; public class bug6794831 { private final CountDownLatch countDownLatch = new CountDownLatch(1); - public static void main(String args[]) throws InterruptedException { + public static void main(String args[]) + throws InterruptedException, InvocationTargetException { new bug6794831().run(); } - private void run() throws InterruptedException { - SwingUtilities.invokeLater(new Runnable() { + private void run() throws InterruptedException, InvocationTargetException { + SwingUtilities.invokeAndWait(new Runnable() { public void run() { for (UIManager.LookAndFeelInfo lookAndFeelInfo : UIManager.getInstalledLookAndFeels()) { try {