Skip to content

Commit 231873e

Browse files
xjlimTimer
authored andcommitted
one-line waiting for app start (#3411)
* one-line waiting for app start * remove fixed todo
1 parent 36cd35d commit 231873e

File tree

2 files changed

+3
-19
lines changed

2 files changed

+3
-19
lines changed

appveyor.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ platform:
2828
- x64
2929

3030
install:
31-
# TODO: Remove after https://github.com/appveyor/ci/issues/1426 is fixed
32-
- set PATH=C:\Program Files\Git\mingw64\bin;%PATH%
3331
- ps: Install-Product node $env:nodejs_version $env:platform
3432

3533
build: off
@@ -41,4 +39,4 @@ skip_commits:
4139
test_script:
4240
- node --version
4341
- npm --version
44-
- sh tasks/e2e-%test_suite%.sh
42+
- bash tasks/e2e-%test_suite%.sh

tasks/e2e-kitchensink.sh

+2-16
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,7 @@ PORT=3001 \
218218
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
219219
NODE_PATH=src \
220220
nohup npm start &>$tmp_server_log &
221-
while true
222-
do
223-
if grep -q 'You can now view' $tmp_server_log; then
224-
break
225-
else
226-
sleep 1
227-
fi
228-
done
221+
grep -q 'You can now view' <(tail -f $tmp_server_log)
229222
E2E_URL="http://localhost:3001" \
230223
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
231224
CI=true NODE_PATH=src \
@@ -287,14 +280,7 @@ PORT=3002 \
287280
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
288281
NODE_PATH=src \
289282
nohup npm start &>$tmp_server_log &
290-
while true
291-
do
292-
if grep -q 'You can now view' $tmp_server_log; then
293-
break
294-
else
295-
sleep 1
296-
fi
297-
done
283+
grep -q 'You can now view' <(tail -f $tmp_server_log)
298284
E2E_URL="http://localhost:3002" \
299285
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
300286
CI=true NODE_PATH=src \

0 commit comments

Comments
 (0)