JDK-6959787 : java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.html failed on 7b94
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: x86
  • Submitted: 2010-06-09
  • Updated: 2011-03-07
  • Resolved: 2011-03-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b100Fixed
Related Reports
Relates :  
Relates :  
Description
Testsuite name: regression
test: java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.html

JDK/JRE tested: 7b94

OS/architecture: amd64-solaris10

Reproducible: Always

Reproducible on machine: stt-12.russia

Is it a platform specific regression: N

Is it a Regression: Y
test failed on b94, but passed on b93

Regression introduced in release/build: b94

Test run log location:
stt-robot@stt12:/export/JQA/regression/7b94/cur2/work/java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.jtr

----------messages:(3/136)----------
command: applet FilenameFilterTest.html
reason: User specified action: run applet FilenameFilterTest.html 
elapsed time (seconds): 2.22
----------System.out:(0/0)----------
----------System.err:(5/330)----------
java.lang.RuntimeException: Filter was not called
        at FilenameFilterTest.start(FilenameFilterTest.java:88)
        at com.sun.javatest.regtest.AppletWrapper$AppletRunnable.run(AppletWrapper.java:153)
        at java.lang.Thread.run(Thread.java:717)
STATUS:Failed.Applet thread threw exception: java.lang.RuntimeException: Filter was not called
result: Failed. Execution failed: Applet thread threw exception: java.lang.RuntimeException: Filter was not called


test result: Failed. Execution failed: Applet thread threw exception: java.lang.RuntimeException: Filter was not called


Steps to reproduce: 
[stt-robot@stt-12]$ /export/jdk/jdk1.6.0_21b05_j4b/bin/java -jar /net/vice/export/home0/regression/tools/jtest-latest/lib/jtreg.jar -testjdk:/export/jdk/7b94/jdk1.7.0/ /net/vice/export/home0/regression/workspaces/170/1.7.0b96/j2se/test/java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.html                 
Directory "JTreport" not found: creating
Directory "JTwork" not found: creating
Directory "JTwork/scratch" not found: creating
Test results: failed: 1
Report written to JTreport/report.html
Results written to /export/JQA/regression/7b94/JTwork
Error: Some tests failed or other problems occurred.

Comments
SUGGESTED FIX --- old/test/java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.java 2010-06-11 18:15:13.000000000 +0400 +++ new/test/java/awt/FileDialog/FilenameFilterTest/FilenameFilterTest.java 2010-06-11 18:15:13.000000000 +0400 @@ -83,6 +83,12 @@ if (fd == null) { throw new RuntimeException("fd is null (very unexpected thing :("); } + //Wait a little; some native dialog implementation 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");
11-06-2010

EVALUATION Actually the filter gets called, it just takes a while because the native dialog is being initialized a bit longer than the java-based one. Adding a Thread.sleep(5000); call in the test makes it pass.
11-06-2010

EVALUATION Another regression of 6913179. We should at least figure out how/when to call the user's file name filter. The native GTK dialog may (or may not) support this feature, however the later isn't a problem (eg, see 4031440 as an example for MS Windows).
09-06-2010