8239265: JFR: Test cleanup of jdk.jfr.api.consumer package

Markus Gronlund markus.gronlund at oracle.com
Tue Feb 18 11:53:28 UTC 2020


Looks good.

Markus

-----Original Message-----
From: Erik Gahlin 
Sent: den 17 februari 2020 21:36
To: hotspot-jfr-dev <hotspot-jfr-dev at openjdk.java.net>
Subject: 8239265: JFR: Test cleanup of jdk.jfr.api.consumer package

Hi,

Could I have review of a test cleanup of the jdk.jfr.api.consumer package.

Changes:

- Make test cases exhaustive.
- Add @summary where missing.
- Favor final fields over global variables.
- Refactor so sub test failures can be deduced from stack trace.
- Use try-with-resources.
- Remove unnecessary blank lines .
- Add space after cast.
- Initialize variables close to where they are first used.
- Remove redundant or misaligned logging.
- Use appropriate assert method.
- Put test logic in the main method.
- Reduce interval so tests runs faster.
- Move inner classes to the top.
- Simplify methods.
- Reduce logging to avoid output overflow.
- Add explanatory comments where needed.

Bug:
https://bugs.openjdk.java.net/browse/JDK-8239265

Webrev:
http://cr.openjdk.java.net/~egahlin/8239265/

/test/jdk/jdk/jfr/api/consumer

Thanks
Erik



More information about the hotspot-jfr-dev mailing list