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 c747dc1 commit 049c003
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 @@ -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");
}
Expand Down

0 comments on commit 049c003

Please sign in to comment.