charon
charon copied to clipboard
A "beacon api slots_per_epoch" test fails
🎯 Problem to be solved
A test has failed inconsistently, indicating a potential intermittent issue in the testing environment or code, which may lead to unreliable test results.
--- FAIL: TestErrors (0.04s)
--- FAIL: TestErrors/http_timeout (0.01s)
eth2wrap_test.go:193:
Error Trace: /home/runner/work/charon/charon/app/eth2wrap/eth2wrap_test.go:193
Error: Error "beacon api slots_per_epoch: beacon api new eth2 client: network operation error: dial: i/o timeout" does not contain "beacon api new eth2 client: http request timeout: context deadline exceeded"
Test: TestErrors/http_timeout
The same issue can be reproduced locally running the test in a 10k iteration loop:
cd app/eth2wrap && go test -run=TestErrors/http_timeout
err beacon api slots_per_epoch: beacon api new eth2 client: network operation error: dial: i/o timeout
eth2wrap_test.go:195:
Error Trace: /obol/charon/app/eth2wrap/eth2wrap_test.go:195
Error: Error "beacon api slots_per_epoch: beacon api new eth2 client: network operation error: dial: i/o timeout" does not contain "beacon api new eth2 client: http request timeout: context deadline exceeded"
Test: TestErrors/http_timeout
--- FAIL: TestErrors/http_timeout (2.88s)
🛠️ Proposed solution
- [ ] Review the test and try to reproduce it locally, by running it with
-count=1000
and enabling race detector and coverprofile to atomic keeping the CPU as busy as possible. - [ ] Investigate the error message
beacon api slots_per_epoch: beacon api new eth2 client: network operation error: dial: i/o timeout
to pinpoint the cause of the timeout.