Skip to content

Commit

Permalink
tests: run a long(1+ hr) load test
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMcLear authored Feb 28, 2021
1 parent d7fd393 commit 35ae08c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/load-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
4 changes: 3 additions & 1 deletion src/tests/frontend/travis/runnerLoadTest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 35ae08c

Please sign in to comment.