Migrate tests to JUnit5#465
Conversation
27c1590 to
b7ec9a6
Compare
* Migrate annotations and imports * Migrate assertions * Remove public visibility for test classes and methods * Minor code cleanup
b7ec9a6 to
8512f75
Compare
# Conflicts: # src/test/java/org/jenkinsci/plugins/workflow/support/steps/ExecutorStepTest.java
# Conflicts: # src/test/java/org/jenkinsci/plugins/workflow/EnvWorkflowTest.java # src/test/java/org/jenkinsci/plugins/workflow/steps/durable_task/ShellStepTest.java
…e-task-step-plugin into migrate_to_junit5
| } | ||
|
|
||
| @Parameterized.Parameter public boolean useWatching; | ||
| @ParameterizedClass(name = "watching={0}") |
There was a problem hiding this comment.
Does not really carry over into reports. https://ci.jenkins.io/job/Plugins/job/workflow-durable-task-step-plugin/job/PR-465/12/testReport/org.jenkinsci.plugins.workflow.steps.durable_task/DurableTaskStepTest%5B1%5D/linux_25___Build__linux_25____scriptExitingAcrossRestart/ https://ci.jenkins.io/job/Plugins/job/workflow-durable-task-step-plugin/job/PR-465/12/testReport/org.jenkinsci.plugins.workflow.steps.durable_task/DurableTaskStepTest%5B2%5D/linux_25___Build__linux_25____scriptExitingAcrossRestart/ do not obviously indicate which is which.
There was a problem hiding this comment.
Perhaps Surefire does not support https://docs.junit.org/6.0.3/writing-tests/parameterized-classes-and-tests.html#display-names ?
| assumeFalse("TODO Windows version TBD", Functions.isWindows()); | ||
| @Test | ||
| void scriptExitingDuringShutdown() throws Throwable { | ||
| assumeFalse(Functions.isWindows(), "TODO Windows version TBD"); |
There was a problem hiding this comment.
More idiomatically, @DisabledOnOS.
| @TestExtension("remoteLogger[watching=true]") public static class LogFile implements LogStorageFactory { | ||
| @TestExtension("remoteLogger") public static class LogFile implements LogStorageFactory { |
There was a problem hiding this comment.
This PR aims to migrate all tests to JUnit5. Changes include:
I am well aware that this is a quite large changeset however I hope that there is still interest in this PR and it will be reviewed.
If there are any questions, please do not hesitate to ping me.
Submitter checklist