From 35ae08ca7774f3d944644b7cd798bd45c1b1df34 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 28 Feb 2021 16:05:16 +0000 Subject: [PATCH] tests: run a long(1+ hr) load test --- .github/workflows/load-test.yml | 32 +++++++++++++++++++-- src/tests/frontend/travis/runnerLoadTest.sh | 4 ++- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/.github/workflows/load-test.yml b/.github/workflows/load-test.yml index 787ef1ddd..f4cbbb58d 100644 --- a/.github/workflows/load-test.yml +++ b/.github/workflows/load-test.yml @@ -28,7 +28,7 @@ jobs: run: sudo npm install -g etherpad-load-test - name: Run load test - run: src/tests/frontend/travis/runnerLoadTest.sh + run: src/tests/frontend/travis/runnerLoadTest.sh 25 50 withplugins: # run on pushes to any branch @@ -80,4 +80,32 @@ jobs: # configures some settings and runs npm run test - name: Run load test - run: src/tests/frontend/travis/runnerLoadTest.sh + run: src/tests/frontend/travis/runnerLoadTest.sh 25 50 + + long: + # run on pushes to any branch + # run on PRs from external forks + if: | + (github.event_name != 'pull_request') + || (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id) + name: long running + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - uses: actions/setup-node@v2 + with: + node-version: 12 + + - name: Install all dependencies and symlink for ep_etherpad-lite + run: src/bin/installDeps.sh + + - name: Install etherpad-load-test + run: sudo npm install -g etherpad-load-test + + + # configures some settings and runs npm run test + - name: Run load test + run: src/tests/frontend/travis/runnerLoadTest.sh 5000 5 diff --git a/src/tests/frontend/travis/runnerLoadTest.sh b/src/tests/frontend/travis/runnerLoadTest.sh index 3fce737bc..8a813c20a 100755 --- a/src/tests/frontend/travis/runnerLoadTest.sh +++ b/src/tests/frontend/travis/runnerLoadTest.sh @@ -42,7 +42,9 @@ try curl http://localhost:9001/p/minifyme -f -s >/dev/null sleep 10 log "Running the load tests..." -etherpad-loadtest -d 25 +# -d is duration of test, -a is number of authors to test with +# by specifying the number of authors we set the overall rate of messages +etherpad-loadtest -d $1 -a $2 exit_code=$? kill "$ep_pid" && wait "$ep_pid"