[QA] browser tests race condition with login/logout

Antoine Musso hashar+wmf at free.fr
Tue Jul 1 16:37:32 UTC 2014


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




More information about the QA mailing list