Skip to content

Commit 813469d

Browse files
authored
fix(test): stabilize scheduled E2E AutoTest runs (#1730)
* fix(test): stabilize scheduled E2E runs Use deterministic disk checks for save steps, skip LLM verification for the no-op navigation assertion, and avoid unnecessary apt traffic when Xvfb is already installed. * fix(test): use Java pre-release for navigation test The Go to Super Implementation plan covers vscode-java#4438, which is present in stable 1.55.0 and fixed in the pre-release used by scheduled runs.
1 parent 16a27f0 commit 813469d

4 files changed

Lines changed: 44 additions & 5 deletions

File tree

.github/workflows/e2e-autotest.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,33 @@ jobs:
153153
if: runner.os == 'Linux'
154154
shell: bash
155155
run: |
156-
sudo apt-get update
157-
sudo apt-get install -y xvfb
158-
Xvfb :99 -screen 0 1920x1080x24 &
156+
if ! command -v Xvfb >/dev/null 2>&1; then
157+
echo "Xvfb is not preinstalled; installing it with bounded apt operations."
158+
apt_options=(
159+
-o Acquire::Retries=3
160+
-o Acquire::http::Timeout=15
161+
-o Acquire::https::Timeout=15
162+
)
163+
if ! sudo timeout 120s apt-get "${apt_options[@]}" update; then
164+
echo "::error::Timed out while refreshing apt metadata for Xvfb."
165+
exit 1
166+
fi
167+
if ! sudo timeout 120s apt-get "${apt_options[@]}" install -y --no-install-recommends xvfb; then
168+
echo "::error::Timed out while installing Xvfb."
169+
exit 1
170+
fi
171+
fi
172+
173+
Xvfb :99 -screen 0 1920x1080x24 >"$RUNNER_TEMP/xvfb.log" 2>&1 &
174+
xvfb_pid=$!
159175
echo "DISPLAY=:99" >> "$GITHUB_ENV"
160176
# Give Xvfb a moment to start before the autotest CLI launches VS Code.
161177
sleep 2
178+
if ! kill -0 "$xvfb_pid" 2>/dev/null; then
179+
cat "$RUNNER_TEMP/xvfb.log"
180+
echo "::error::Xvfb failed to start."
181+
exit 1
182+
fi
162183
163184
- name: Download vscode-java-pack VSIX (from branch)
164185
if: ${{ github.event_name != 'schedule' }}

test-plans/java-go-to-super-implementation.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ setup:
2525
extension: "redhat.java"
2626
extensions:
2727
- "vscjava.vscode-java-pack"
28+
# vscode-java 1.55.0 stable contains the #4438 regression covered by this
29+
# plan; use the pre-release carrying the fix on PR runs as schedules do.
30+
preRelease: true
2831
vscodeVersion: "stable"
2932
workspace: "../test-fixtures/super-implementation"
3033
timeout: 300
@@ -82,3 +85,6 @@ steps:
8285
fileName: "Base.java"
8386
contains: "Hello from Base"
8487
timeout: 15
88+
# Navigation completed in the previous step, so this settle-and-assert
89+
# step is visually unchanged by design. verifyEditor is authoritative.
90+
skipLlmVerify: true

test-plans/java-gradle.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,10 @@ steps:
7272

7373
- id: "save-file"
7474
action: "saveFile"
75-
verify: "File saved"
75+
verify: "Test1.java is saved to disk"
76+
verifyFile:
77+
path: "~/project1/src/main/java/project1/Test1.java"
78+
contains: "// gradle test marker"
79+
# The disk assertion proves saveFile persisted the in-memory edit. The
80+
# screenshot-only check can misread the small tab dirty-dot transition.
81+
skipLlmVerify: true

test-plans/java-maven.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,10 @@ steps:
7070
# 2e. Save file
7171
- id: "save-file"
7272
action: "saveFile"
73-
verify: "File saved"
73+
verify: "Foo.java is saved to disk"
74+
verifyFile:
75+
path: "~/src/main/java/java/Foo.java"
76+
contains: "// autotest marker"
77+
# The disk assertion proves saveFile persisted the in-memory edit. The
78+
# screenshot-only check can misread the small tab dirty-dot transition.
79+
skipLlmVerify: true

0 commit comments

Comments
 (0)