[
http://www.stripesframework.org/jira/browse/STS-725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Remi VANKEISBELCK resolved STS-725.
-----------------------------------
Resolution: Fixed
Fix Version/s: Release 1.6
Release 1.5.8
fixed in r1521. Listeners + close().
> MockRoundTrip never destroys filters and dispatcher servlet
> -----------------------------------------------------------
>
> Key: STS-725
> URL: http://www.stripesframework.org/jira/browse/STS-725
> Project: Stripes
> Issue Type: Bug
> Affects Versions: Release 1.6
> Environment: Linux Ubuntu 9.10 64bits
> java version "1.6.0_07"
> Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
> Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)
> Reporter: Remi VANKEISBELCK
> Assignee: Remi VANKEISBELCK
> Priority: Trivial
> Fix For: Release 1.5.8, Release 1.6
>
>
> MockRoundTrip can't be "closed" or "destroyed".
> Thereby, registered filters and dispatcher servlet are never destroyed
> either, and this causes problems with StripesFilter.getConfiguration().
> StripesFilter internally stores refs to configurations as WeakReferences, and
> tries to clean them when you ask for a Configuration (see StripesFilter, line
> 150). But as WeakRefs are not really predictable, you can have more than 1
> config in the static "configurations" field, which eventually prevents from
> getting the Configuration using StripesFilter.getConfiguration().
> The following test currently fails :
> public void testGetStripesConfigTwice() {
> int count = 2;
> for (int i=0; i<count ; i++) {
> Map<String,String> params = new HashMap<String,String>();
> params.put("ActionResolver.Packages", "foo.bar");
> MockServletContext mockServletContext = new
> MockServletContext("FacetedResolverTest");
> mockServletContext.addFilter(StripesFilter.class, "StripesFilter",
> params);
> Configuration config = StripesFilter.getConfiguration();
> assertNotNull(config);
> /*
> for (Filter f : mockServletContext.getFilters()) {
> f.destroy();
> }
> */
> }
> }
>
> but it passed when you set count to 1, or if you manually destroy all
> registered filters (see commented code).
> A "MockServletContext.destroy()" method would be appreciated.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
is your hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials, tech docs,
whitepapers, evaluation guides, and opinion stories. Check out the most
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development