apache / apache/servicecomb-java-chassis

[BUG] - multiple order dependent flaky tests in `swagger/swagger-generator/generator-core`

Đang mở
#5,017 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Java
Star
1.9k
Fork
814
Merge trung bình
8 ngày 23 giờ
Pull request đã merge (30 ngày)
1

Mô tả

### 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_

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu bằng cách chạy lệnh Maven idflakies được cung cấp cho swagger/swagger-generator/generator-core và kiểm tra các test gọi SwaggerOperations.generate(...). Truy vết cách trạng thái swaggerOperations dùng chung được khởi tạo và xóa giữa các phương thức test. Hoàn thành khi các test được đề cập đều pass với các thứ tự thực thi được ngẫu nhiên hóa.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java
Lĩnh vực
testing-qa
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
38/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.