From 53b80d628029991879b82dd87ade0b89360f1553 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 27 Sep 2020 15:13:55 +0100 Subject: [PATCH] tests: adding a check before finishing responsiveness test - allowing load test to run for 25 instead of 30 seconds to facilitate travis performance. (#4363) The goal of this PR is to make tests break less frequently. It is yet confirmed if this has worked but time will tell. --- tests/frontend/specs/responsiveness.js | 7 ++++--- tests/frontend/travis/runnerLoadTest.sh | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/frontend/specs/responsiveness.js b/tests/frontend/specs/responsiveness.js index 8938ff41b..121851c25 100644 --- a/tests/frontend/specs/responsiveness.js +++ b/tests/frontend/specs/responsiveness.js @@ -72,14 +72,15 @@ describe('Responsiveness of Editor', function() { } helper.waitFor(function(){ // Wait for the ability to process - return true; // Ghetto but works for now + var el = inner$('body'); + if(el[0].textContent.length > amount) return true; }).done(function(){ var end = Date.now(); // get the current time var delay = end - start; // get the delay as the current time minus the start time - expect(delay).to.be.below(400); + expect(delay).to.be.below(600); done(); - }, 1000); + }, 5000); }, 10000); }); diff --git a/tests/frontend/travis/runnerLoadTest.sh b/tests/frontend/travis/runnerLoadTest.sh index 5ac447758..3f7b6d9ac 100755 --- a/tests/frontend/travis/runnerLoadTest.sh +++ b/tests/frontend/travis/runnerLoadTest.sh @@ -41,8 +41,8 @@ curl http://localhost:9001/p/minifyme -f -s > /dev/null sleep 10 # run the backend tests -echo "Now run the load tests for 30 seconds and if it stalls before 100 then error" -etherpad-loadtest -d 30 +echo "Now run the load tests for 25 seconds and if it stalls before 100 then error" +etherpad-loadtest -d 25 exit_code=$? kill $!