From eba5278266bd76b600a8a627726f347f0cd302e4 Mon Sep 17 00:00:00 2001 From: Ronit Agarwala Date: Tue, 12 Dec 2023 00:42:26 -0500 Subject: [PATCH] Change run.ts to wait for port to be ready. Add an await operator to wait for server to be ready before client makes requests. Prevents "ConnectionError: connect ECONNREFUSED ::1:9200" error --- run.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.ts b/run.ts index 446a7ac..7c1934e 100644 --- a/run.ts +++ b/run.ts @@ -128,7 +128,7 @@ export async function launch({ : launchDocker(props)) try { - Promise.race([ + await Promise.race([ waitPort({ port, protocol: 'http' }), neverResolve(waitUntilStopped()), ])