Skip to content

Commit 22d5c13

Browse files
mriggerclaude
andcommitted
Fix DataFusion CI: replace blind sleep with build step and readiness poll
The DataFusion CI job was flaky because it backgrounded `cargo run` with a fixed 300s sleep that raced against compilation time. Split into explicit build, start, and readiness-check steps so tests only run once the server is actually listening on port 50051. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 91d7a6a commit 22d5c13

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.github/workflows/main.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,14 @@ jobs:
242242
with:
243243
toolchain: stable
244244
override: true
245-
- name: Run DataFusion Server
245+
- name: Build DataFusion Server
246246
run: |
247247
cd src/sqlancer/datafusion/server/datafusion_server
248-
cargo run & sleep 300
248+
cargo build
249+
- name: Start DataFusion Server
250+
run: |
251+
cd src/sqlancer/datafusion/server/datafusion_server
252+
cargo run &
249253
- name: Set up JDK 11
250254
uses: actions/setup-java@v3
251255
with:
@@ -254,6 +258,18 @@ jobs:
254258
cache: 'maven'
255259
- name: Build SQLancer
256260
run: mvn -B package -DskipTests=true
261+
- name: Wait for DataFusion Server
262+
run: |
263+
for i in $(seq 1 30); do
264+
if nc -z 127.0.0.1 50051 2>/dev/null; then
265+
echo "DataFusion server is ready"
266+
exit 0
267+
fi
268+
echo "Waiting for DataFusion server... ($i/30)"
269+
sleep 10
270+
done
271+
echo "DataFusion server failed to start within 300s"
272+
exit 1
257273
- name: Run Tests
258274
run: |
259275
DATAFUSION_AVAILABLE=true mvn test -Pdatafusion-tests

0 commit comments

Comments
 (0)