Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jzvikart committed Dec 16, 2024
1 parent 87f862f commit a439407
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions tests/test1.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ async function test2() {
}

try {
// const allTests = [test1, test2];
const allTests = [test2];
const allTests = [test1]; // [test1, test2];
allTests.forEach(runIntegrationTest);
} catch (error) {
logError(error);
Expand Down
5 changes: 2 additions & 3 deletions tests/testLibrary.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,13 @@ async function startAgent(character = DEFAULT_CHARACTER) {
});
log(`proc=${JSON.stringify(proc)}`);
const startTime = Date.now();
const url = "http://127.0.0.1:3000/";
while (true) {
try {
const response = await fetch(url, {method: "GET"});
const response = await fetch("http://127.0.0.1:3000/", {method: "GET"});
if (response.ok) break;
} catch (error) {}
if (Date.now() - startTime > 120000) {
throw new Error("Timeout 120s waiting for server to start");
throw new Error("Timeout waiting for server to start");
} else {
log("Waiting for the server to be ready...");
await sleep(1000);
Expand Down

0 comments on commit a439407

Please sign in to comment.