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 a9a71c9 commit ec07b58
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 @@ -552,11 +552,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 ec07b58

Please sign in to comment.