Skip to content

Commit

Permalink
Add flexible-wait to Windows distributable tests too
Browse files Browse the repository at this point in the history
  • Loading branch information
pimterry committed Dec 16, 2024
1 parent c0f0f98 commit 3f3267d
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions test/distributables-test/windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,19 @@ echo Starting server...

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

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

:serverup

echo:
echo:
Expand Down

0 comments on commit 3f3267d

Please sign in to comment.