From 00d2b77de37dcc64407018228ac0bd6f4728e8e6 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()), ])