Skip to content

Commit 3f3267d

Browse files
committed
Add flexible-wait to Windows distributable tests too
1 parent c0f0f98 commit 3f3267d

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

test/distributables-test/windows.bat

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,19 @@ echo Starting server...
1313

1414
START "server" /b .\httptoolkit-server\bin\httptoolkit-server start
1515

16-
REM The closest we can get to a 10 second delay on Windows in CI, ick:
17-
ping -n 10 127.0.0.1 >NUL
16+
echo Waiting for server...
17+
FOR /L %%i IN (1,1,30) DO (
18+
curl -s http://127.0.0.1:45456/ >NUL 2>&1
19+
IF NOT ERRORLEVEL 1 (
20+
echo Server is up
21+
goto :serverup
22+
)
23+
timeout /t 1 /nobreak >NUL
24+
)
25+
echo Server failed to start
26+
goto :error
27+
28+
:serverup
1829

1930
echo:
2031
echo:

0 commit comments

Comments
 (0)