From 8f0cbf8be5378cf967e4691c8fb62745c50525e9 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 c15ca1fe9..7da558ab0 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -497,11 +497,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"); }