refraction-networking / conjure

Conjure Refraction Networking station code
https://refraction.network
Apache License 2.0
70 stars 21 forks source link

Make Inconsistent test deterministic #235

Closed jmwample closed 1 year ago

jmwample commented 1 year ago

inconsistent test based on race in select made more predictable with ctx, close, cancel

Ensure that TestHeartBeatReadWrite finishes in a deterministic way instead of relying on select / write / read ordering that may result in failing test.

This has been causing occasional failing github actions seemingly at random that pass on re-run.

jmwample commented 1 year ago

Ironically this PR took several retries to successfully pass all build steps. It had a different test (TestLivenessCached) failed once and then the connection that the go compiler opened to download a package failed once while building the application.