-
Notifications
You must be signed in to change notification settings - Fork 511
8339511: [TestBug] Convert Non parametrized base tests to JUnit 5 #1576
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
Conversation
👋 Welcome back jbhaskar! A progress list of the required criteria for merging this PR into |
@jaybhaskar 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 25 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 |
@jaybhaskar this pull request can not be integrated into git checkout basetest
git fetch https://git.openjdk.org/jfx.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
Webrevs
|
This reverts commit 86f7327.
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.
I left a few (mostly minor) comments, a few suggestions, and three problems that must be fixed:
- You removed a total of 9 tests in three files:
Before: 5538 tests (0 failures, 28 ignored)
After: 5529 tests (0 failures, 28 ignored)
-
Three of the files that you converted still have some JUnit 4 imports
-
You missed converting the
expected=
parameter in the@Test
annotation to aconvertThrows
inVetoableObservableListTest.java
.
modules/javafx.base/src/test/java/test/com/sun/javafx/binding/ContentBindingMapTest.java
Outdated
Show resolved
Hide resolved
modules/javafx.base/src/test/java/test/com/sun/javafx/binding/ContentBindingSetTest.java
Outdated
Show resolved
Hide resolved
modules/javafx.base/src/test/java/test/com/sun/javafx/binding/SelectBindingTest.java
Outdated
Show resolved
Hide resolved
modules/javafx.base/src/test/java/test/com/sun/javafx/binding/StringFormatterTest.java
Outdated
Show resolved
Hide resolved
modules/javafx.base/src/test/java/test/com/sun/javafx/binding/StringFormatterTest.java
Outdated
Show resolved
Hide resolved
modules/javafx.base/src/test/java/test/com/sun/javafx/binding/SelectBindingTest.java
Outdated
Show resolved
Hide resolved
modules/javafx.base/src/test/java/test/com/sun/javafx/collections/ListListenerHelperTest.java
Outdated
Show resolved
Hide resolved
...s/javafx.base/src/test/java/test/javafx/binding/expression/AbstractNumberExpressionTest.java
Show resolved
Hide resolved
modules/javafx.base/src/test/java/test/javafx/collections/ModifiableObservableListBaseTest.java
Outdated
Show resolved
Hide resolved
modules/javafx.base/src/test/java/test/javafx/collections/VetoableObservableListTest.java
Show resolved
Hide resolved
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.
One remaining problem with mistakenly removed tests. The rest looks good.
modules/javafx.base/src/test/java/test/com/sun/javafx/binding/ContentBindingSetTest.java
Outdated
Show resolved
Hide resolved
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.
looked at each line, double checking:
- before->beforeEach etc.
- exception types in assertThrows
Could not run the junit4 query because there are still parameterized tests left.
left a few comments, plus some tests need to be brought back.
otherwise looks good.
modules/javafx.base/src/test/java/test/com/sun/javafx/binding/ContentBindingListTest.java
Show resolved
Hide resolved
modules/javafx.base/src/test/java/test/com/sun/javafx/binding/ErrorLoggingUtiltity.java
Show resolved
Hide resolved
modules/javafx.base/src/test/java/test/javafx/collections/VetoableObservableListTest.java
Show resolved
Hide resolved
What I did to verify this was to do a grep just on those files that changed:
So, while this doesn't verify that this PR picked up all classes without parameterized tests, it does confirm that there are no JUnit4 imports left in any of the ones that were converted. |
I got curious, so I looked for all base test files with junit4 imports, and excluded the ones that have parameterized tests. I see that there are a few:
So they can either be added to this PR (if there is nothing else that makes them tricky to convert) or lumped in with the parameterized tests and done in the follow-on bug. |
I left those specific files unchanged as they contain multiple assertThrows statements and involve try-catch blocks, which require additional attention for proper conversion. I would like to address these in pull request focused on parameterized tests. |
Looks good now. Please wait to see if @andy-goryachev-oracle has any more comments. /reviewers 2 |
@kevinrushforth |
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.
thank you for making the changes!
looks good now.
/integrate |
Going to push as commit 5bec3f8.
Your commit was automatically rebased without conflicts. |
@jaybhaskar Pushed as commit 5bec3f8. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Successfully converted Non-parametrized base tests to JUnit 5
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1576/head:pull/1576
$ git checkout pull/1576
Update a local copy of the PR:
$ git checkout pull/1576
$ git pull https://git.openjdk.org/jfx.git pull/1576/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1576
View PR using the GUI difftool:
$ git pr show -t 1576
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1576.diff
Webrev
Link to Webrev Comment