From: Timo Tijhof Date: Sun, 29 Sep 2019 01:32:47 +0000 (+0100) Subject: selenium: Remove "RunJobs" wait from specialrecentchanges test X-Git-Tag: 1.34.0-rc.0~43^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=4bd69c7536aa8b8aa7850748435761d5572b368c selenium: Remove "RunJobs" wait from specialrecentchanges test 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 --- diff --git a/tests/selenium/specs/specialrecentchanges.js b/tests/selenium/specs/specialrecentchanges.js index 75415ea875..8720ee503f 100644 --- a/tests/selenium/specs/specialrecentchanges.js +++ b/tests/selenium/specs/specialrecentchanges.js @@ -1,8 +1,7 @@ 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, @@ -18,7 +17,6 @@ describe( 'Special:RecentChanges', function () { browser.call( function () { return Api.edit( name, content ); } ); - RunJobs.run(); RecentChangesPage.open();