6959787: java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.html failed on 7b94
authoranthony
Wed, 16 Jun 2010 11:26:15 +0400
changeset 5757 5796afaab709
parent 5666 3c6f0dcb9715
child 5758 6fef7077b8a6
6959787: java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.html failed on 7b94 Summary: Add a delay to the test to make sure the filename filters are called. Reviewed-by: dcherepanov, art
jdk/test/java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.java
--- a/jdk/test/java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.java	Thu Jun 10 13:59:09 2010 -0700
+++ b/jdk/test/java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.java	Wed Jun 16 11:26:15 2010 +0400
@@ -83,6 +83,12 @@
         if (fd == null) {
             throw new RuntimeException("fd is null (very unexpected thing :(");
         }
+        //Wait a little; some native dialog implementations may take a while
+        //to initialize and call the filter. See 6959787 for an example.
+        try {
+            Thread.sleep(5000);
+        } catch (Exception ex) {
+        }
         fd.dispose();
         if (!filter_was_called) {
             throw new RuntimeException("Filter was not called");