RFR: 7172176 java/jconsole test/sun/tools/jconsole/ImmutableResourceTest.sh failing

Erik Gahlin erik.gahlin at oracle.com
Thu Jun 7 16:47:43 PDT 2012


Hi again,

Could you please review an update?

Turns out that the ResourceCheck test didn't work for Mac when I removed
it from the problems list. There was code in the shell script that needed
to know all the platform names.

Instead of just adding "Darwin" to the script I decided to make the test 
pure
Java, to speed things up and to avoid similar platform problems in the
future. I couldn't find a way in JTREG to add a test-JDK relative 
library using
tags so I loaded the lib/jconsole.jar dynamically within the test.

Changes from previous webrev:

- classes will be loaded using a URLClassLoader (test.jdk/lib/jconsole.jar)

- the resource bundle is loaded from the custom class loader

- the method Resources#getMnemonicInt is now invoked by reflection. Not
   super clean, but better then having a shell script in my opinion.

- removed failing tests from the ProblemsList.txt

Tested in JPRT with "-testset core -onlytests '.*jdk_tools2.*'" on all 
platforms,

Here is the webrev:
http://cr.openjdk.java.net/~egahlin/7172176_02/

Thanks for taking the time to review this.

Erik

Erik Gahlin skrev 2012-05-30 13:40:
> Hi,
>
> Could you please review 7172176, which is a test fix for 7017818 -
> JConsoleResources.java cannot be handled by translation team.
>
> Webrev:
> http://cr.openjdk.java.net/~egahlin/7172176_01/
>
> Changes:
>
> - Removed the ImmutableRequest.java and ImmutableRequest.sh since the
>   JConsoleResources class was refactored away with 7017818.
>
> - Removed hard-wired resource bundle keys in ResourceCheckTest.java, 
> the keys
>   are now looked up by reflection on the Messages class. The test also
>   checks there is one-to-one mapping between reource bundle keys and
>   the constants available in the Message class.
>
> Michael,
>
> I removed sun/tools/jconsole/ResourceCheckTest.sh from the jdk/test/
> ProblemList.txt. This means the test will break once the translated files
> will be checked in. Unused messages were sent for translation and they
> need to be removed.
>
> Are you ok with that?
>
> Thanks!
> Erik



More information about the serviceability-dev mailing list