-
Notifications
You must be signed in to change notification settings - Fork 590
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
Fixing Unexpected method calls: HttpSession.invalidate #2201
Fixing Unexpected method calls: HttpSession.invalidate #2201
Conversation
Signed-off-by: Andras Katona <[email protected]>
Executed all fast test methods 5000 times - all succeeded, slow ones were run only a few times. |
@mhratson would you please review this? |
This is where invalidateSession is called. UserTaskManager schedules an UserTaskScanner which is invalidating the session in its every tick, but most of the time it happens after Easymock.verify.
|
@akatona84 thanks for the fix! |
@akatona84 can you help me reproduce?
|
I was testing with Idea jUnit, but this should work too. Actually it depends how busy the machine is while running. Let me try to put a sleep somewhere and see how i could make it consistently failing without this fix. |
It's pretty drastic, but this way at least it's consistently failing for me.
This created task should be executed right after the scheduling, but it's not getting processor time, just after the mock is verified in the test's thread: Line 107 in 85d6ca7
|
Summary
Expected Behavior
Tests are running without failure
Actual Behavior
Tests are failing sometimes with unexpected method call.
Steps to Reproduce
testCreateUserTask
in IDEAdditional evidence
Categorization