Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/289238
Change subject: Bump delays in uw.ConcurrentQueue's "Adding a new item when almost done" test ...................................................................... Bump delays in uw.ConcurrentQueue's "Adding a new item when almost done" test This test seems extra flaky and is occasionally failing. Increasing the timeouts should help. I tried writing down what is causing it to fail, then I tried making ASCII diagrams, then I gave up and decided to just draw it: https://phabricator.wikimedia.org/F4024185 Change-Id: Ib7eb50f0a2b62eb2f8acb221481858c2bf7f4567 --- M tests/qunit/uw.ConcurrentQueue.test.js 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/38/289238/1 diff --git a/tests/qunit/uw.ConcurrentQueue.test.js b/tests/qunit/uw.ConcurrentQueue.test.js index c5b137b..418b559 100644 --- a/tests/qunit/uw.ConcurrentQueue.test.js +++ b/tests/qunit/uw.ConcurrentQueue.test.js @@ -22,14 +22,14 @@ // each call of the returned function, the Promise it returns will take 10 ms longer to resolve. // This ensures that actions in ConcurrentQueue don't all finish at the same instant, which would // break tests (they make stronger assumptions about the order than ConcurrentQueue guarantees). - function incrementallyDelayedPromise() { - var delay = 20; + function incrementallyDelayedPromise( multiplier ) { + var delay = 20 * ( multiplier || 1 ); return function () { var deferred = $.Deferred(); setTimeout( function () { deferred.resolve(); }, delay ); - delay += 10; + delay += 10 * ( multiplier || 1 ); return deferred.promise(); }; } @@ -371,7 +371,8 @@ QUnit.test( 'Adding a new item when almost done', function ( assert ) { var done, action, changeHandler, progressHandler, completeHandler, queue, onProgress; done = assert.async(); - action = sinon.spy( incrementallyDelayedPromise() ); + // This test seems extra flaky and was occasionally failing, double the delays + action = sinon.spy( incrementallyDelayedPromise( 2 ) ); changeHandler = sinon.stub(); progressHandler = sinon.stub(); completeHandler = sinon.stub(); -- To view, visit https://gerrit.wikimedia.org/r/289238 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7eb50f0a2b62eb2f8acb221481858c2bf7f4567 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński <matma....@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits