8000 Fix object disposal in tests by jeremy-visionaid · Pull Request #173 · ironfede/openmcdf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix object disposal in tests #173

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

Merged

Conversation

jeremy-visionaid
Copy link
Collaborator

The counterpart to fixing CA2000 in the core library, this fixes some more test implementation logic (e.g. more Assert.ThrowsException, etc.), removes redundant code, and fixes CA2000 for the tests

Catching the exception makes it harder to debug/fix failures
File system operations are inherently racy, so File.Delete already does
nothing if the file does not exist.
Goes some way to addressing the analyzer warning:
CA2000: Dispose objects before losing scope
@jeremy-visionaid
Copy link
Collaborator Author

@ironfede In the absence of PR triggers for CI, I have tested these ones manually on Ubuntu 24.04 too!

@ironfede ironfede merged commit 6b9fd67 into ironfede:master Oct 3, 2024
@jeremy-visionaid jeremy-visionaid deleted the disposal-in-tests branch October 16, 2024 07:31
5CE0
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
0