Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit 246a245

Browse files
committed
test(memory): Move LongResend test into test/memory. Add additional tests. Assert memory usage. Run in CI.
1 parent 2e9f7b3 commit 246a245

File tree

4 files changed

+235
-161
lines changed

4 files changed

+235
-161
lines changed

.github/workflows/test-code.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,27 @@ jobs:
131131
max_attempts: 2
132132
timeout_minutes: 15
133133
retry_on: error
134-
command: DEBUG='' npm run test-flakey || echo "::warning::Flakey Tests Failed"
134+
command: npm run test-flakey || echo "::warning::Flakey Tests Failed"
135135

136+
memory:
137+
name: Memory Tests using Node ${{ matrix.node-version }}
138+
runs-on: ubuntu-latest
139+
strategy:
140+
fail-fast: false
141+
matrix:
142+
node-version: [12.x, 14.x]
143+
144+
steps:
145+
- uses: actions/checkout@v2
146+
- uses: actions/setup-node@v2
147+
with:
148+
node-version: ${{ matrix.node-version }}
149+
- name: npm ci
150+
run: npm ci
151+
- uses: nick-invision/retry@v2
152+
name: Run Test
153+
with:
154+
max_attempts: 2
155+
timeout_minutes: 20
156+
retry_on: error
157+
command: DEBUG='' npm run test-memory

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"test-integration-no-resend": "jest --forceExit --testTimeout=10000 --testPathIgnorePatterns='resend|Resend' --testNamePattern='^((?!(resend|Resend|resent|Resent|gap|Gap)).)*$' test/integration/*.test.*",
4949
"test-integration-resend": "jest --forceExit --testTimeout=15000 --testNamePattern='(resend|Resend|resent|Resent)' test/integration/*.test.*",
5050
"test-integration-dataunions": "jest --forceExit --testTimeout=15000 --runInBand test/integration/dataunion",
51+
"test-memory": "node --gc-global --predictable-gc-schedule node_modules/.bin/jest --forceExit --testTimeout=15000 --runInBand test/integration/dataunion",
5152
"test-flakey": "jest --forceExit test/flakey/*",
5253
"test-browser": "node ./test/browser/server.js & node node_modules/nightwatch/bin/nightwatch ./test/browser/browser.js && pkill -f server.js",
5354
"install-example": "cd examples/webpack && npm ci",

test/flakey/LongResend.test.ts

Lines changed: 0 additions & 160 deletions
This file was deleted.

0 commit comments

Comments
 (0)