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

Support assertion that all resources are closed #53

Open
jostick opened this issue Aug 3, 2017 · 2 comments
Open

Support assertion that all resources are closed #53

jostick opened this issue Aug 3, 2017 · 2 comments
Labels
P4 type=enhancement Make an existing feature better

Comments

@jostick
Copy link

jostick commented Aug 3, 2017

I really like jimfs for testing. However there are a few things that I cannot easily test at the moment, especially checking if all resources have been closed. It seems FileSystemState already contains a list of open resources, but I can't find a way to access this list.

Having a method like getOpenResources() or assertNoOpenResources() would be really nice and easy to implement.

@ronshapiro
Copy link
Contributor

Does JimfsFileSystem.isOpen() suffice?

@cpovirk cpovirk added P4 type=enhancement Make an existing feature better labels Jul 25, 2019
@bitzl
Copy link

bitzl commented Feb 22, 2021

I can't speak for the OP, but for our use cases JimfsFileSystem.isOpen() would be great - we could just end every relevant unit test with an assertThat(fileSystem.isOpen()).isFalse(). As far as I see, this is currently package private and therefore not accessible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4 type=enhancement Make an existing feature better
Projects
None yet
Development

No branches or pull requests

4 participants