-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8287008: Improve tests for thread dumps in JSON format #8784
Conversation
👋 Welcome back alanb! A progress list of the required criteria for merging this PR into |
@AlanBateman The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
/label remove imx |
@AlanBateman
|
/label remove jmx |
@AlanBateman |
Webrevs
|
It would be useful if ThreadDump.java contained a comment with a description of the JSON file syntax. It could either be in the form of a simple dump or as a simple syntactic description. |
Still TBD on where the JSON "schema" will be specified, it might be HotSpotDiagnosMXBean.dumpThreads as it will needed by tools that parse the JSON text. So when we do that then I think we can reference it from the test class. |
Ok, but I was mostly hoping to have it to make reviewing this PR easier. |
If we use JSON schema then it will something like this, does that help?
|
I think a short example dump would actually be easier to read alongside the code. |
That's a good idea. I've updated the class description to include an example and also a code example of how it can be used in tests. The thread dump example collapses several objects to avoid it getting too unwieldily. I've started PR8807 to document the format. |
test/jdk/com/sun/management/HotSpotDiagnosticMXBean/DumpThreads.java
Outdated
Show resolved
Hide resolved
test/jdk/com/sun/management/HotSpotDiagnosticMXBean/DumpThreads.java
Outdated
Show resolved
Hide resolved
I've updated the patch to generate the process and thread identifiers as strings rather than numbers (as JSON numbers that are integers don't have the required range). The test infra and DumpThreads.java test are expanded a bit and now test the processId, time and runtimeVersion fields. |
@AlanBateman This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 53 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
/integrate |
Going to push as commit 15f1583.
Your commit was automatically rebased without conflicts. |
@AlanBateman Pushed as commit 15f1583. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This change is mostly test infrastructure and improvements to the testing of thread dumps in JSON format. It also tweaks the thread dump format so that the process identifier and thread identifiers are a type string rather than number.
The tests for thread dumps added by JEP 425 are changed to use the test infrastructure library. The tests for JEP 428 will also make use of this test infrastructure.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/8784/head:pull/8784
$ git checkout pull/8784
Update a local copy of the PR:
$ git checkout pull/8784
$ git pull https://git.openjdk.java.net/jdk pull/8784/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 8784
View PR using the GUI difftool:
$ git pr show -t 8784
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/8784.diff