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 Lazy IO opening too many files in integration tests #1917

Merged
merged 3 commits into from
Jun 9, 2024
Merged

Conversation

xsebek
Copy link
Member

@xsebek xsebek commented Jun 9, 2024

When running on macOS, the integration tests open too many file handles,
even when you do not need to run any swarm file tests.

> cabal run -O0 swarm-integration -- -p editors
swarm-integration: data/scenarios/Challenges/_bucket-brigade/hauler.sw: openFile: resource exhausted (Too many open files)

The solution is to get the file paths only and safely open them as needed.
Surprisingly, this even makes the integration test code simpler.

When run on macOS, the integration tests open too many file handles,
even when you do not need to run any of the swarm file tests.
```
> cabal run -O0 swarm-integration -- -p editors
swarm-integration: data/scenarios/Challenges/_bucket-brigade/hauler.sw: openFile: resource exhausted (Too many open files)
```
The solution is to only get the file paths and safely open them as needed.
restyled-io bot and others added 2 commits June 9, 2024 16:45
Co-authored-by: Restyled.io <commits@restyled.io>
@byorgey
Copy link
Member

byorgey commented Jun 9, 2024

479-atomic-race needs a longer timeout, I have seen spurious failures with that one occasionally.

Copy link
Member

@byorgey byorgey left a comment

Choose a reason for hiding this comment

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

👍

@xsebek xsebek added the merge me Trigger the merge process of the Pull request. label Jun 9, 2024
@mergify mergify bot merged commit cbaf54d into main Jun 9, 2024
11 checks passed
@mergify mergify bot deleted the lazy-io-tests branch June 9, 2024 17:39
mergify bot pushed a commit that referenced this pull request Jun 9, 2024
I have seen the `479-atomic-race` integration test timeout several times recently (most recently in #1917).  Increase the timeout for that test from the default 1s to 2s.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Trigger the merge process of the Pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants