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

Remove use of finalizer in Rack::Test::UploadedFile (Fixes #338) #339

Merged
merged 1 commit into from
Jul 9, 2023

Conversation

jeremyevans
Copy link
Contributor

A finalizer was used in the Tempfile case to close and unlink the Tempfile created, but it was never needed, because Tempfile defines its own finalizer that closes and unlinks.

Update the spec so that it actually tests that tempfiles are getting removed and unlinked. This uses 500 tempfiles in the JRuby test because some lower values I tried failed CI. CRuby could likely get away with only a handle of tempfiles, but the spec uses 50 to be sure it doesn't fail.

A finalizer was used in the Tempfile case to close and unlink the
Tempfile created, but it was never needed, because Tempfile defines
its own finalizer that closes and unlinks.

Update the spec so that it actually tests that tempfiles are getting
removed and unlinked. This uses 500 tempfiles in the JRuby test
because some lower values I tried failed CI.  CRuby could likely get
away with only a handle of tempfiles, but the spec uses 50 to be
sure it doesn't fail.
@jeremyevans jeremyevans requested a review from ioquatix July 9, 2023 03:22
@jeremyevans jeremyevans merged commit 4fa741f into rack:main Jul 9, 2023
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants