Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flapy test in monitoringapi_internal_test #886

Closed
dB2510 opened this issue Aug 2, 2022 · 0 comments · Fixed by #934
Closed

Flapy test in monitoringapi_internal_test #886

dB2510 opened this issue Aug 2, 2022 · 0 comments · Fixed by #934
Assignees
Labels
bug Something isn't working

Comments

@dB2510
Copy link
Contributor

dB2510 commented Aug 2, 2022

Problem to be solved

A test named peer_ping_failing is flapping in monitoringapi_internal_test: https://github.com/ObolNetwork/charon/runs/7615741168?check_suite_focus=true which is responsible to assert error obtained from ready function if peer is not able to connect to quorum number of peers. The problem lies here:

require.Eventually(t, func() bool {

which expects test to complete in 100ms. This test is non-deterministic since it depends on mutex to result in desired error.

Proposed solution

Make this test deterministic by determining what is the ideal duration to check in require.Eventually function.

@dB2510 dB2510 added the bug Something isn't working label Aug 2, 2022
@dB2510 dB2510 self-assigned this Aug 4, 2022
@dB2510 dB2510 linked a pull request Aug 8, 2022 that will close this issue
obol-bulldozer bot pushed a commit that referenced this issue Aug 8, 2022
Fixes flapy test in monitoringapi_internal_test.

category: test
ticket: #886
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant