Skip to content

Decouple integration tests from samples and support dynamic port allocation to enable parallel testing #3145

@marsevilspirit

Description

@marsevilspirit

Description

Currently, the integration tests in dubbo-go are tightly coupled with the samples. Most of these tests share a hardcoded port (e.g., 20000). This configuration leads to several bottlenecks:

  1. Sequential Execution: Tests cannot run in parallel due to port conflicts.
  2. Time Waste: After a test completes, the OS takes time (roughly 15s for TIME_WAIT) to fully release the port. Subsequent tests must wait for this period, or they will fail to bind the port.
  3. CI Inefficiency: As the number of integration tests grows, the cumulative wait time becomes a significant overhead in our CI pipeline.

Motivation

By separating integration tests from samples and implementing a dynamic port allocation mechanism, we can:

  • Eliminate the 15-second wait between test cases.
  • Enable parallel execution of integration tests.
  • Improve the stability of the CI environment by avoiding "address already in use" errors.

Expected Outcome

  • Integration tests can be executed concurrently.
  • Total CI execution time is significantly reduced.
  • Developers can run the full test suite locally without manual port cleanup.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions