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

fix: test race condition #25

Merged
merged 16 commits into from
Mar 19, 2024
Merged

fix: test race condition #25

merged 16 commits into from
Mar 19, 2024

Conversation

Integralist
Copy link
Contributor

@Integralist Integralist commented Mar 18, 2024

We're seeing data race issues in CI:
https://github.com/domainr/epp2/actions/runs/8330541688/job/22795438262?pr=22

There are a few different asynchronous layers within these epp2 tests...

  • echoServer is run in a goroutine and reads from t.
  • echoServer also runs a separate goroutine that writes to t.
  • The caller of echoServer also runs multiple goroutines to write to t.

The changes in this PR should resolve the data race issue.

Instead of passing around the *testing.T I'm using channels to handle the coordination/synchronization of error messages.

@Integralist Integralist requested a review from cee-dub March 18, 2024 19:50
@Integralist Integralist added the bug Something isn't working label Mar 19, 2024
Copy link
Member

@cee-dub cee-dub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only possibly-contentious item is the error comparison that is known not to be compatible with TinyGo.

IMO, we should develop this as if TinyGo will gain that feature by the time Domainr and TinyGo need to ship these things together.

@Integralist
Copy link
Contributor Author

All changes have been made. I'm stepping away from the keyboard for 30mins and I'll merge when I'm back.

@Integralist Integralist merged commit b44f32e into main Mar 19, 2024
4 checks passed
@Integralist Integralist deleted the integralist/fix-race branch March 19, 2024 15:32
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 this pull request may close these issues.

2 participants