-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Issue #10164 - test to prove out FSPool mount vs reference count logic #10170
Issue #10164 - test to prove out FSPool mount vs reference count logic #10170
Conversation
* @param fsUri the filesystem URI to fetch | ||
* @return the reference count on that URI | ||
*/ | ||
protected int getReferenceCount(URI fsUri) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make this method package-protected; we don't want anyone (including ourselves) to use it for anything but unit tests. And explicitly say in the javadoc something like "only used for testing".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
...y-core/jetty-util/src/test/java/org/eclipse/jetty/util/resource/MountedPathResourceTest.java
Show resolved
Hide resolved
} | ||
finally | ||
{ | ||
resourceFactory.stop(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also assert mount count == 0 and getReferenceCount(uriRoot) == 0 after the resourceFactory
is stopped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Adding testcase to show FSPool mount vs reference count logic as it currently stands in 12.0.x HEAD (from #10164 (comment))