Flaky-test: org.apache.distributedlog.TestTruncate
- Dominant language
- Java
- Stars
- 2k
- Forks
- 976
- Avg merge
- 6d 15h
- Merged PRs (30d)
- 7
Description
`mvn test -f stream/distributedlog/core/pom.xml`
```
[ERROR] Tests run: 7, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 112.456 s <<< FAILURE! - in org.apache.distributedlog.TestTruncate
[ERROR] org.apache.distributedlog.TestTruncate.testTruncation Time elapsed: 20.812 s <<< ERROR!
org.apache.distributedlog.exceptions.BKTransmitException: Failed to write to bookkeeper; Error is (-6) Not enough non-faulty bookies available : -6
```
The tests flake (sometimes fail with error above, sometime VM crashes) on my mac but pass if I run them one by one:
```
mvn test -f stream/distributedlog/core/pom.xml -Dtest=org.apache.distributedlog.TestTruncate#testPurgeLogs
mvn test -f stream/distributedlog/core/pom.xml -Dtest=org.apache.distributedlog.TestTruncate#testTruncation
mvn test -f stream/distributedlog/core/pom.xml -Dtest=org.apache.distributedlog.TestTruncate#testExplicitTruncation
mvn test -f stream/distributedlog/core/pom.xml -Dtest=org.apache.distributedlog.TestTruncate#testOnlyPurgeSegmentsBeforeNoneFullyTruncatedSegment
mvn test -f stream/distributedlog/core/pom.xml -Dtest=org.apache.distributedlog.TestTruncate#testPartiallyTruncateTruncatedSegments
```
probably there is some race in test setup/teardown
Contributor guide
Research direction
Start by running `mvn test -f stream/distributedlog/core/pom.xml` and compare it with the individual `TestTruncate` methods listed in the issue. Read `org.apache.distributedlog.TestTruncate` with attention to test setup and teardown, then investigate the insufficient-bookies error and VM crashes; done means the full test class runs reliably without these failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100