Skip to content

Commit

Permalink
test: python stability fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus committed Nov 27, 2024
1 parent 2541c09 commit 185998c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,11 +491,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");
}
Expand Down

0 comments on commit 185998c

Please sign in to comment.