Skip to content

Commit 91c0b83

Browse files
committed
Fix e2e timeout: add 30s kill timer to Chrome, increase wait to 35min
Chrome headless can hang indefinitely if the page doesn't load. Wrap all Chrome calls with `timeout 30` to kill after 30 seconds. Increase the workflow wait loop from 25 to 35 min and job timeout from 30 to 45 min, since OctoPrint can take 10+ min to start on slower CI runners.
1 parent 0fb9200 commit 91c0b83

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
e2e-test:
7474
needs: build
7575
runs-on: ubuntu-latest
76-
timeout-minutes: 30
76+
timeout-minutes: 45
7777
steps:
7878
- uses: actions/checkout@v4
7979

@@ -112,12 +112,12 @@ jobs:
112112
113113
- name: Wait for tests to complete
114114
run: |
115-
for i in $(seq 1 300); do
115+
for i in $(seq 1 420); do
116116
[ -f artifacts/exit-code ] && break
117117
sleep 5
118118
done
119119
if [ ! -f artifacts/exit-code ]; then
120-
echo "ERROR: Tests did not complete within 25 minutes"
120+
echo "ERROR: Tests did not complete within 35 minutes"
121121
docker logs octopi-test 2>&1 | tail -80
122122
exit 1
123123
fi

testing/hooks/screenshot.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ BROWSER_PATH=$(command -v google-chrome-stable 2>/dev/null || true)
3434

3535
if [ -n "$BROWSER_PATH" ]; then
3636
echo " Taking headless screenshot with $BROWSER_PATH ..."
37-
"$BROWSER_PATH" --headless=new --no-sandbox --disable-gpu \
37+
timeout 30 "$BROWSER_PATH" --headless=new --no-sandbox --disable-gpu \
3838
--disable-dev-shm-usage --virtual-time-budget=15000 \
3939
--screenshot="$ARTIFACTS_DIR/screenshot.png" \
4040
--window-size=1280,720 \

testing/tests/test_octoprint_web.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ HTTP_PORT="${QEMU_HTTP_PORT:-8080}"
5555
BROWSER=$(command -v google-chrome-stable 2>/dev/null || true)
5656
if [ -n "$BROWSER" ] && [ -n "$ARTIFACTS_DIR" ]; then
5757
echo " Taking wizard screenshot via headless Chrome..."
58-
"$BROWSER" --headless=new --no-sandbox --disable-gpu \
58+
timeout 30 "$BROWSER" --headless=new --no-sandbox --disable-gpu \
5959
--disable-dev-shm-usage --virtual-time-budget=15000 \
6060
--screenshot="$ARTIFACTS_DIR/screenshot.png" \
6161
--window-size=1280,720 \

0 commit comments

Comments
 (0)