8373830: Refactor test/jdk/java/time/test tests to use JUnit over TestNG#28911
8373830: Refactor test/jdk/java/time/test tests to use JUnit over TestNG#28911justin-curtis-lu wants to merge 14 commits intoopenjdk:masterfrom
Conversation
…odify to expression lambdas
| for (TemporalAccessor sample : samples()) { | ||
| sample.get(MockFieldNoValue.INSTANCE); | ||
| } | ||
| Assertions.assertThrows(DateTimeException.class, () -> { |
There was a problem hiding this comment.
It appears that not all the TemporalAccessors from samples() are being tested. I want to keep the total count of tests before and after the migration the same, so handling this separate from this issue. Filed JDK-8374051.
|
👋 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 2 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
|
@justin-curtis-lu Command syntax:
Some examples:
If issues are specified only by their ID, the title will be automatically retrieved from JBS. The project prefix ( |
|
@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. |
|
/issue add JDK-8373829 |
|
@justin-curtis-lu |
Webrevs
|
naotoj
left a comment
There was a problem hiding this comment.
LGTM over all. There may be a bug in the tool, as I see duplicated comments for no apparent reason (did not check all the files)
Also, please rename the directory java/time/nontestng to java/time/nonjunit.
| static final int HIJRAH_DATE_TYPE = 6; // java.time.chrono.Ser.HIJRAH_DATE_TYPE | ||
| static final int MINGUO_DATE_TYPE = 7; // java.time.chrono.Ser.MINGUO_DATE_TYPE | ||
| static final int THAIBUDDHIST_DATE_TYPE = 8; // java.time.chrono.Ser.THAIBUDDHIST_DATE_TYPE | ||
| static final int THAIBUDDHIST_DATE_TYPE = 8; // java.time.chrono.Ser.THAIBUDDHIST_DATE_TYPE// java.time.chrono.Ser.THAIBUDDHIST_DATE_TYPE |
There was a problem hiding this comment.
The comment seems duplicated for no apparent reason. (Tool's bug?)
There was a problem hiding this comment.
Thanks for spotting, it does appear to be left by the tool. I searched for other occurrences and did not find any besides the ones you mentioned.
| public class TCKChronologySerialization extends AbstractTCKTest { | ||
|
|
||
| static final int CHRONO_TYPE = 1; // java.time.chrono.Ser.CHRONO_TYPE | ||
| static final int CHRONO_TYPE = 1; // java.time.chrono.Ser.CHRONO_TYPE// java.time.chrono.Ser.CHRONO_TYPE |
| public class TCKEraSerialization extends AbstractTCKTest { | ||
|
|
||
| static final int JAPANESE_ERA_TYPE = 5; // java.time.chrono.Ser.JAPANESE_ERA | ||
| static final int JAPANESE_ERA_TYPE = 5; // java.time.chrono.Ser.JAPANESE_ERA// java.time.chrono.Ser.JAPANESE_ERA |
|
Still looks good. I think the new commit warrants a copy right year increment |
|
/integrate |
|
Going to push as commit 53300b4.
Your commit was automatically rebased without conflicts. |
|
@justin-curtis-lu Pushed as commit 53300b4. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Please review this PR which migrates the java.time tests from TestNG to JUnit. The java.time tests use TestNG based on the directory level settings configured by TEST.properties, so they are best migrated altogether. This is a large PR, so I have tried to make the changes clear by commit.
First, the auto conversion tool is run in b1fd7db.
3805cfd and b697ca5 are required so that the tests can actually compile and run.
d07c912 addresses the timeout annotation which was not covered by the auto conversion tool.
The rest of the commits are aesthetic related.
Before conversion stats
After conversion stats
Progress
Issues
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28911/head:pull/28911$ git checkout pull/28911Update a local copy of the PR:
$ git checkout pull/28911$ git pull https://git.openjdk.org/jdk.git pull/28911/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 28911View PR using the GUI difftool:
$ git pr show -t 28911Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28911.diff
Using Webrev
Link to Webrev Comment