From 98e31980b499968c64fbcb204e209ae666228e65 Mon Sep 17 00:00:00 2001 From: Mihaly Lengyel Date: Wed, 27 Nov 2024 20:40:31 +0100 Subject: [PATCH] test: python stability fixes --- test/helpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/helpers.js b/test/helpers.js index 3cb5b6180..8147a2d79 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -550,11 +550,11 @@ async function assertValidator(actualValidate, expectedValidate, values) { export async function getLatestURLWithToken() { let latestURLWithToken; const start = Date.now(); - while (latestURLWithToken === undefined) { + while (!latestURLWithToken) { const response = await fetch(`${TEST_APPLICATION_SERVER_BASE_URL}/token`); const respBody = await response.json(); latestURLWithToken = respBody.latestURLWithToken; - if (latestURLWithToken === undefined || latestURLWithToken === "") { + if (!latestURLWithToken) { if (Date.now() - start > 10000) { throw new Error("Timeout waiting for latestURLWithToken"); }