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

test(iroh): Make test_relay_datagram_queue less timing dependent #3106

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

matheus23
Copy link
Contributor

@matheus23 matheus23 commented Jan 8, 2025

Description

I've seen test_relay_datagram_queue fail on windows recently: https://github.com/n0-computer/iroh/actions/runs/12669553316/job/35307313406

Given that

  • when the test failed, it took 720ms,
  • when the test succeeded, it took 150ms and 320ms,
  • we've got a 100ms timeout on one of the futures, and
  • the tokio scheduler (I think) doesn't optimize for average job time,

I'm not convinced there's a race condition.

So, instead I'm rewriting the test to be less timing-dependent. And less confusing as well and have better logging.

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.

@matheus23 matheus23 added this to the v0.31.0 milestone Jan 8, 2025
@matheus23 matheus23 self-assigned this Jan 8, 2025
Copy link

github-actions bot commented Jan 8, 2025

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3106/docs/iroh/

Last updated: 2025-01-08T16:55:05Z

Copy link

github-actions bot commented Jan 8, 2025

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: d33826a

@matheus23 matheus23 added this pull request to the merge queue Jan 9, 2025
Merged via the queue into main with commit 3fedee9 Jan 9, 2025
26 checks passed
@matheus23 matheus23 deleted the matheus23/test-less-timing-dependency branch January 9, 2025 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants