selenium: Remove "RunJobs" wait from specialrecentchanges test
authorTimo Tijhof <krinklemail@gmail.com>
Sun, 29 Sep 2019 01:32:47 +0000 (02:32 +0100)
committerKrinkle <krinklemail@gmail.com>
Sun, 29 Sep 2019 02:32:24 +0000 (02:32 +0000)
This test was consistently reaching the RunJobs timeout of
10 tries and then giving up. This happens in CI, where it wasted
about ~ 5 seconds, and locally where it takes about 30s for mw.

Like so:
> RunJobs through requests to the main page (run 1).
> RunJobs detected 12 more queued job(s).
> RunJobs through requests to the main page (run 2).
> RunJobs detected 12 more queued job(s).

Etc, until it reaches run 10 and gives up. This also suggests
the whole thing isn't wokring, but that's a separate matter.

First and foremost, RecentChange objects are saved from a PRESEND
deferred update, which means it does not require a job queue wait
in order to appear on Special:RecentChanges.

This was added in e908d347ef2 (T199446) "to keep the number of
unrun jobs low". The idea being that this test makes an edit via
the API, which means it creates jobs without running them. On
the other hand, there's also lots of test steps that view pages
but don't create jobs, which would make this optimisation premature.
If and when we do encounter a test failing due to a job backlog,
I'm confident we can find a better solution at that time.

Bug: T234002
Bug: T225730
Bug: T199446
Change-Id: I9ef8c5b65d4b636572569912f04f48ed40aa0564

tests/selenium/specs/specialrecentchanges.js

index 75415ea..8720ee5 100644 (file)
@@ -1,8 +1,7 @@
 const assert = require( 'assert' ),
        Api = require( 'wdio-mediawiki/Api' ),
        RecentChangesPage = require( '../pageobjects/recentchanges.page' ),
 const assert = require( 'assert' ),
        Api = require( 'wdio-mediawiki/Api' ),
        RecentChangesPage = require( '../pageobjects/recentchanges.page' ),
-       Util = require( 'wdio-mediawiki/Util' ),
-       RunJobs = require( 'wdio-mediawiki/RunJobs' );
+       Util = require( 'wdio-mediawiki/Util' );
 
 describe( 'Special:RecentChanges', function () {
        let content,
 
 describe( 'Special:RecentChanges', function () {
        let content,
@@ -18,7 +17,6 @@ describe( 'Special:RecentChanges', function () {
                browser.call( function () {
                        return Api.edit( name, content );
                } );
                browser.call( function () {
                        return Api.edit( name, content );
                } );
-               RunJobs.run();
 
                RecentChangesPage.open();
 
 
                RecentChangesPage.open();