apache / apache/servicecomb-java-chassis
[BUG] - multiple order dependent flaky tests in `swagger/swagger-generator/generator-core`
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 814
- Avg merge
- 8d 23h
- Merged PRs (30d)
- 1
Description
### Steps to Reproduce
Several tests in the `swagger/swagger-generator/generator-core` module exhibit **order-dependent (OD) flakiness**. These tests rely on shared state through `SwaggerOperations.generate(...)` and previously used `static` fields inside the test classes. These tests previously used a `static SwaggerOperations` field that was shared across all test methods in the class, and when test methods are executed in different orders, some permutations caused a later test to run after the shared `swaggerOperations` field had already been cleared.
To reproduce:
```bash
mvn edu.illinois.cs:idflakies-maven-plugin:2.0.0:detect -pl swagger/swagger-generator/generator-core -am -Ddt.randomize.rounds=30 -Ddt.detector.original_order.all_must_pass=false
```
### Expected Behavior
Mentioned tests should pass with different orders.
### Servicecomb Version
3.3.0
### Additional Context
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.