[QA] browser tests race condition with login/logout

Chris McMahon cmcmahon at wikimedia.org
Tue Jul 1 16:41:11 UTC 2014


I've tried this same thing and not had this result; both my browsers stay
logged in.  But if it points to an answer, that would be great...
-Chris

PS: We'd have to think very carefully about multiple users, because of
security concerns if for no other reasons.



On Tue, Jul 1, 2014 at 9:37 AM, Antoine Musso <hashar+wmf at free.fr> wrote:

> Hello,
>
> We have a bunch of browser tests that:
> - potentially runs concurrently
> - target the same wiki
> - use the same username
>
> During our weekly checkin, Chris McMahon raised the issue of tests being
> suddenly logged out which obviously break tests badly.
>
> I suspected a race condition between runs. Here how I reproduce it:
>
> - Open a browser (ex: Safari)
> - Head to www.mediawiki.org , login
>
> - Open another browser (ex: Firefox
> - Head to www.mediawiki.org , login
>
> Logout from one the browser, you end up loggued out from the other.
>
>
> I guess whenever we logout, all that username sessions are invalidated
> on the server side.
>
> The fix would be to use different username probably. Or have the per
> user session invalidation to only invalidate the given session id and
> not per username (havent looked at mediawiki core code).
>
>
> So a race condition between jobs seems to be a good candidate to me.
>
> cheers,
>
> --
> Antoine "hashar" Musso
>
>
> _______________________________________________
> QA mailing list
> QA at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/qa
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wikimedia.org/pipermail/qa/attachments/20140701/de4ce5f0/attachment.html>


More information about the QA mailing list