-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8366733: Re-examine older java.text NF, DF, and DFS serialization tests #27108
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
8366733: Re-examine older java.text NF, DF, and DFS serialization tests #27108
Conversation
👋 Welcome back jlu! A progress list of the required criteria for merging this PR into |
@justin-curtis-lu 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 47 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 |
@justin-curtis-lu 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. |
Webrevs
|
Have you verified that the serialized streams in these new tests are identical to the hexformat versions? |
Although the existing tests are old and not run, I think the existing data can be reused. You can create overload for |
I looked at the respective Serialization save files and what was being tested in the load files to determine the configuration of the replacement tests. I stepped through the tests with a debugger to make sure the data read from the stream that was being tested was accurate with what was indicated in the save file. I do not expect the streams themselves to be identical (since the new ones are mocked), but rather the invariants being tested should be the same. |
The new tests mock these streams so that we could do away with relying on the hex dump files (which required a user to navigate to the unused save file to determine how the stream was created). What is being tested should be the same for the mocked stream and the original stream itself. However, if it is desirable to test the exact streams from older releases, I can bring the data files back and test their streams directly. |
Yes, I think so. Unless there is any specific reason to remove tests, it is the main purpose for these regression tests. |
Yes, the purpose of the hex dumps is to test exactly the stream produced by earlier versions. |
Brought the hex dump files back (more appropriately under the DecimalFormat folder) and retained the original tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for revisiting the serialization tests.
@@ -1,5 +1,5 @@ | |||
# | |||
# Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. | |||
# Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: since the content of the file has not changed, I don't think we need to update the year
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restored in c57082c
/integrate |
Going to push as commit 24a7349.
Your commit was automatically rebased without conflicts. |
@justin-curtis-lu Pushed as commit 24a7349. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This PR cleans up the existing DecimalFormatSymbols, DecimalFormat, and NumberFormat serialization tests.
As mentioned in #27008 these tests can be re-visited.
These older tests are either not run (since they rely on being run by older JDK versions), rely on hex dump files, or are simply outdated. These are now removed or updated and moved under DecimalFormat/SerializationTest.java and DFSSerializationTest.java. Additionally, tests to check the stream version invariants are added for DecimalFormat.
Below are the existing tests that are removed or modified. (Their associated hex dump files are removed as well).
DFSDeserialization142.java & DFSSerialization142.java (D)
NumberFormat/DFSSerialization.java (D)
SerializationLoad.java & SerializationSave.java (D)
NumberRegression.java (M)
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27108/head:pull/27108
$ git checkout pull/27108
Update a local copy of the PR:
$ git checkout pull/27108
$ git pull https://git.openjdk.org/jdk.git pull/27108/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 27108
View PR using the GUI difftool:
$ git pr show -t 27108
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27108.diff
Using Webrev
Link to Webrev Comment