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

Issue #10164 - test to prove out FSPool mount vs reference count logic #10170

Merged
merged 4 commits into from
Jul 31, 2023

Conversation

joakime
Copy link
Contributor

@joakime joakime commented Jul 28, 2023

Adding testcase to show FSPool mount vs reference count logic as it currently stands in 12.0.x HEAD (from #10164 (comment))

* @param fsUri the filesystem URI to fetch
* @return the reference count on that URI
*/
protected int getReferenceCount(URI fsUri)
Copy link
Contributor

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".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

}
finally
{
resourceFactory.stop();
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@joakime joakime requested a review from lorban July 28, 2023 18:43
@joakime joakime linked an issue Jul 28, 2023 that may be closed by this pull request
@joakime joakime merged commit 4a2ebe0 into jetty-12.0.x Jul 31, 2023
@joakime joakime deleted the fix/12.0.x/test-fs-mount-reference-count-logic branch July 31, 2023 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Needless META-INF/resources and web-fragment.xml mounts
2 participants