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

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

Thanks for applying. Yes, I bet the test is failing because of the same issue I 
mentioned above. The problem of course with these high level tests is that 
while they cover a lot of ground they don't tell you exactly where the problem 
is, just that there is a problem. I'm sure you have other things to do as well, 
but I think the test demonstrates an issue in the shiro-core itself. When 
things happen "fast enough" Shiro fails to initialize properly  (I think). The 
test code itself is very simple and seems to work more reliably when I run it 
via Maven but fails frequently when running via Eclipse. I was hoping that 
maybe you could run this test in your own IDE and see what you get - and if it 
would fail, it'd be perhaps easier for you to follow the stack trace and say 
"aha - the problem must be in CacheManager initialization because...." and I 
could take it from there. Right now it's been a bit like trying to find the 
needle from the haystack - eventually I'll probably find it with heavy use of 
the debugger but hoping to shortcut that process by extracting some domain 
knowledge from you.

> 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