[ 
https://issues.apache.org/jira/browse/SHIRO-96?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770159#action_12770159
 ] 

Kalle Korhonen commented on SHIRO-96:
-------------------------------------

Agree, likely not desirable. But I don't think we need to necessarily remove 
the call in get, but maybe the underlying strong references collection should 
have Set semantics (i.e. no duplicates) rather than simply a List/Queue. So 
maybe a LinkedHashSet. But then again, if you want to be super conservative 
about memory usage, maybe the idea was that the strong references should just 
keep the most used objects in memory rather than the last hundred and 
certainly, a hundred references to the same object will consume less memory 
than a hundred references to different objects. Anyway, we shouldn't deal with 
that as part of this issue - please ask the original authors and open a new 
issue for it (you can assign to me if you like) and I'll close this one (just 
re-enabled the tests in r829916).

> Add meaningful integration tests to assert key web functionality
> ----------------------------------------------------------------
>
>                 Key: SHIRO-96
>                 URL: https://issues.apache.org/jira/browse/SHIRO-96
>             Project: Shiro
>          Issue Type: Test
>          Components: Authentication (log-in)
>    Affects Versions: 1.0
>         Environment: any
>            Reporter: Kalle Korhonen
>             Fix For: 1.0
>
>         Attachments: integration-tests.patch
>
>
> Related to SHIRO-93 (but you closed it already - could have re-opened as 
> well). Assert login/logout and remember me functionality. Also updating 
> htmlunit to newly released 2.6. Note that tests revealed an interesting 
> thread-safety issue: sometimes 
> getAuthorizationCache().get(upToken.getUsername()); on line 141 of 
> SimpleAccountRealm returned null, causing the authentication to fail. It 
> happened much frequently when I was running the test via Eclipse, but 
> couldn't get it to run when running via Maven. I took an initial look at the 
> CacheManager and didn't follow through completely, but it looked like that a 
> map initialization somewhere may not have been synchronized. Note that these 
> tests run considerably faster than if a human was using a browser but 
> otherwise they don't semantically do anything else different. A patch to 
> follow.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to