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-cli): reduce flakyness of cli_provide_file_resume #2563

Merged
merged 8 commits into from
Jul 29, 2024

Conversation

divagant-martian
Copy link
Contributor

Description

In windows there is no way to copy a file being accessed by another process in an accessible way. This is what makes this test fail since it attempt to copy the blobs.db folder a couple of times while the iroh instance that handles is running.

The change is simple: shutdown the provider, copy the files, re-start the provider. From my perspective, this does not affect what the test is attempting to assert.

Now, since this includes re-starting the iroh instance that provides the files several times, and we match on output, sometimes we can get weird logs related to shutdown. One of those (and the only one I have seen so far) is for a netcheck report and didn't finish on time. Instead of logging this in the reportgen actor, the error is bubbled up to be handled by the netcheck actor (which will have shutdown by then) thus reducing noise and allowing for better error handling in the future

Breaking Changes

n/a

Notes & open questions

n/a

Change checklist

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

@divagant-martian divagant-martian changed the title recreate provider for test test(iroh-cli): fix flaky behaviour of cli_provide_file_resume Jul 29, 2024
Copy link

github-actions bot commented Jul 29, 2024

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

Last updated: 2024-07-29T19:01:47Z

Copy link
Contributor

@dignifiedquire dignifiedquire left a comment

Choose a reason for hiding this comment

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

less flaky tests make me happy, one small nit

@divagant-martian
Copy link
Contributor Author

divagant-martian commented Jul 29, 2024

while I had to re-add the flaky mark since one of the windows worflows failed, I think it's still an improvement: the test is now flaky instead of failing 100% of the time. Addressed your nit and if it's ok I'll merge and we can keep looking into the new kinds of failures in later antiflaky attempts

@divagant-martian divagant-martian changed the title test(iroh-cli): fix flaky behaviour of cli_provide_file_resume test(iroh-cli): reduce flakyness of cli_provide_file_resume Jul 29, 2024
@divagant-martian divagant-martian added this pull request to the merge queue Jul 29, 2024
Merged via the queue into main with commit f085e63 Jul 29, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants