Skip to content

Commit 56c6163

Browse files
SattvikSattvik
authored andcommitted
fix: stress tests
1 parent 8d2a26e commit 56c6163

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

stress-tests/src/common/utils.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ export const createStInstanceForTest = async () => {
1111
docker_image_name: process.env.SUPERTOKENS_DOCKER_IMAGE || "supertokens/supertokens-postgresql"
1212
})
1313
});
14-
14+
1515
if (!response.ok) {
1616
throw new Error(`HTTP error! Status: ${response.status}`);
1717
}
18-
18+
1919
const data: any = await response.json();
2020

2121
const coreUrl = data.deployment.core_url;
@@ -24,16 +24,16 @@ export const createStInstanceForTest = async () => {
2424
let attempts = 0;
2525
const maxAttempts = 30;
2626
const retryDelay = 2000;
27-
27+
2828
while (!isReady && attempts < maxAttempts) {
2929
try {
30-
const healthCheck = await fetch(`${coreUrl}/health`, {
30+
const healthCheck = await fetch(`${coreUrl}`, {
3131
method: 'GET',
3232
headers: {
3333
'Accept': 'application/json'
3434
}
3535
});
36-
36+
3737
if (healthCheck.ok) {
3838
isReady = true;
3939
} else {
@@ -45,7 +45,7 @@ export const createStInstanceForTest = async () => {
4545
await new Promise(resolve => setTimeout(resolve, retryDelay));
4646
}
4747
}
48-
48+
4949
if (!isReady) {
5050
throw new Error(`Core URL ${coreUrl} did not become ready after ${maxAttempts} attempts`);
5151
}
@@ -62,7 +62,7 @@ export const deleteStInstance = async (deploymentId: string) => {
6262
const response = await fetch(`https://provision.supertokens.sattvik.me/deployments/${deploymentId}`, {
6363
method: 'DELETE'
6464
});
65-
} finally {}
65+
} finally { }
6666
}
6767

6868
export const formatTime = (ms: number): string => {

0 commit comments

Comments
 (0)