summary refs log tree commit diff
path: root/scripts/stress/identify.js
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-08-07 11:59:48 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-08-07 11:59:48 +1000
commit24ec642d495198749f9c3da37ecf42b42d869ff6 (patch)
tree9e14c9a30522cb961814f02e92d4c3e29832d3f7 /scripts/stress/identify.js
parentMerge pull request #1085 from spacebarchat/feat/dependency-updates (diff)
downloadserver-24ec642d495198749f9c3da37ecf42b42d869ff6.tar.xz
* add TOKEN and ITER env vars to identify test script
* kill child process server when tests are done, not just parent
Diffstat (limited to 'scripts/stress/identify.js')
-rw-r--r--scripts/stress/identify.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/stress/identify.js b/scripts/stress/identify.js

index 7dea5e4d..9c74c634 100644 --- a/scripts/stress/identify.js +++ b/scripts/stress/identify.js
@@ -4,9 +4,8 @@ require("dotenv").config(); const { OPCODES } = require("../../dist/gateway/util/Constants.js"); const WebSocket = require("ws"); const ENDPOINT = `ws://localhost:3002?v=9&encoding=json`; -const TOKEN = - "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEwOTMxMTgwMjgzNjA1MzYxMDYiLCJpYXQiOjE2ODA2OTE5MDB9.9ByCqDvC4mIutW8nM7WhVCtGuKW08UimPnmBeNw-K0E"; -const TOTAL_ITERATIONS = 500; +const TOKEN = process.env.TOKEN; +const TOTAL_ITERATIONS = process.env.ITER ? parseInt(process.env.ITER) : 500; const doTimedIdentify = () => new Promise((resolve) => {