[Chore] Unit-Test optimize#18214
Conversation
There was a problem hiding this comment.
Pull request overview
This PR optimizes the dolphinscheduler-master integration test suite by splitting a large workflow-start integration test class into multiple smaller test classes and running those integration tests in parallel forks via Surefire, while also improving CI test output visibility.
Changes:
- Split
WorkflowStartTestCaseinto multiple focused*TestCaseclasses to enable parallel execution. - Add host normalization in YAML test context initialization to support per-fork master listen ports.
- Configure Surefire to run integration tests with
forkCount=4, and update CI to print per-test execution info.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/WorkflowTestCaseContextFactory.java | Normalizes placeholder master address in YAML fixtures to the runtime masterConfig address for forked test runs. |
| dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/cases/WorkflowStartTimeoutTestCase.java | New focused integration tests for timeout/alert scenarios, extracted from the previous monolithic test class. |
| dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/cases/WorkflowStartTestCase.java | Removed large monolithic workflow-start integration test class (split into smaller classes). |
| dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/cases/WorkflowStartTaskGroupTestCase.java | New focused integration tests for task group behavior. |
| dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/cases/WorkflowStartSwitchTestCase.java | New focused integration tests for switch task behavior. |
| dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/cases/WorkflowStartSubWorkflowTestCase.java | New focused integration tests for sub-workflow behavior. |
| dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/cases/WorkflowStartSerialStrategyTestCase.java | New focused integration tests for serial start strategies and serial graphs. |
| dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/cases/WorkflowStartParameterTestCase.java | New focused integration tests for workflow/command parameter behaviors. |
| dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/cases/WorkflowStartGraphTestCase.java | New focused integration tests for graph traversal/dependency behaviors. |
| dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/cases/WorkflowStartDispatchPolicyTestCase.java | New focused integration tests for dispatch policy edge cases. |
| dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/cases/WorkflowStartConditionTestCase.java | New focused integration tests for condition task behaviors. |
| dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/cases/WorkflowStartBasicTestCase.java | New focused integration tests for basic workflow start scenarios. |
| dolphinscheduler-master/pom.xml | Adds Surefire executions to separate unit vs integration tests and runs integration tests in parallel forks with per-fork H2 DB and ports. |
| .github/workflows/unit-test.yml | Enables more verbose/console-friendly Surefire output in CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|



Was this PR generated or assisted by AI?
Yes.
Purpose of the pull request
WorkflowStartTestCaseis divided into multiple test cases for parallel execution base of the use case.The test execution time was reduced from 30 minutes to 11 minutes.Brief change log
Verify this pull request
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(or)
Pull Request Notice
Pull Request Notice
If your pull request contains incompatible change, you should also add it to
docs/docs/en/guide/upgrade/incompatible.md