summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/stress/identify.js5
-rw-r--r--scripts/test.js1
2 files changed, 3 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) => {
diff --git a/scripts/test.js b/scripts/test.js
index 28ac3778..69e9fdd6 100644
--- a/scripts/test.js
+++ b/scripts/test.js
@@ -34,6 +34,7 @@ server.stdout.on("data", (data) => {
 	if (data.toString().toLowerCase().includes("listening")) {
 		// we good :)
 		console.log("we good");
+		server.kill();
 		process.exit();
 	}
 });