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
7951: Factor out commonly used test helper classes from org.openjdk.jmc.common.test into dedicated test library module #451
Conversation
👋 Welcome back clanger! A progress list of the required criteria for merging this PR into |
...test/src/test/java/org/openjdk/jmc/flightrecorder/ext/jfx/test/JfxPulseDurationRuleTest.java
Outdated
Show resolved
Hide resolved
...sts/org.openjdk.jmc.test.jemmy/src/test/java/org/openjdk/jmc/test/jemmy/MCJemmyTestBase.java
Show resolved
Hide resolved
package org.openjdk.jmc.common.test; | ||
|
||
import static org.junit.Assert.assertArrayEquals; | ||
package org.openjdk.jmc.test; |
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.
nitpick: I think the package name should follow the artifact name, maybe something like :
package org.openjdk.jmc.test; | |
package org.openjdk.jmc.test.lib; |
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.
Hm, that would be possible but it would render the change a lot larger. There are also subpackages io
and mock.item
. If we were to rename all 3 packages we'd probably have to touch more tests. So, if we opt to rename the packages I'd prefer to do it in a separate PR.
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.
Ok, I understand the concern.
@RealCLanger 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 1 new commit 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 |
Thanks for the reviews. /integrate |
@RealCLanger Pushed as commit 456da39. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Triggered by an issue in project core/tests/org.openjdk.jmc.common.test, I came up with a little refactoring.
So, org.openjdk.jmc.common.test is somewhat of a hybrid project. It contains both, some common test scaffolding classes plus some actual tests for the org.openjdk.jmc.common module.
According to our special setup, which is not really like what maven would expect, we have all sources, also for the tests in the src/main/java folder. With a little tweak, that is specifying ${project.basedir}/src/main/java in the pom.xml, we can direct maven to consume the tests from there instead of the usually expected src/test/java subfolder. However, when updating the eclipse project configuration from that pom.xml, the project would not export the test helper classes to other modules within eclipse any more.
I'm hereby factoring out the test helper classes into a new module called core/tests/org.openjdk.jmc.testlib. This module will then only serve as a test helper library but not contain any actual tests.
Furthermore I include some other cleanups in project and manifest files, e.g. removal of .settings files which are .gitignored because they would be generated when importing the JMC projects into Eclipse.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jmc pull/451/head:pull/451
$ git checkout pull/451
Update a local copy of the PR:
$ git checkout pull/451
$ git pull https://git.openjdk.org/jmc pull/451/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 451
View PR using the GUI difftool:
$ git pr show -t 451
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jmc/pull/451.diff