emissary
emissary copied to clipboard
Some tests in pkg/kates are flakely
Describe the bug
Some of the tests in pkg/kates
give inconsistent results. So far I've been able to confirm that TestCoherence
and TestDeltasWithRemoteDelay
are flakely.
To Reproduce
TestCoherence
- Make sure any containers that kates tests rely are pruned. We're starting from scratch
- Run Test. You should observe it passing
- Clear go test cache and run test again. You should no see it fail
- Run test again. You should now see it pass again
TestDeltasWithRemoteDelay
- Make sure any containers that kates tests rely are pruned. We're starting from scratch
- Run Test. You should observe it fail
- Run Test again. You should observe it passing
Expected behavior Tests should consistently either pass or fail
Additional Context Many tests in the kates package are closer to integration tests in that they rely on external K3s docker container. Most of the inconsistencies in the tests seem to be the result of bad state, tests not properly cleaning up after themselves or certain timing or racing issues when starting up the K3 container.
When running tests, I used the same flags CI does: go test -race -count=1 -timeout 30m -parallel=150