Skip to content

Commit 03a40ce

Browse files
TGJLSclaude
andcommitted
Fix server lifetime: setsid + pre-test health check
Use setsid so adaptixserver runs in a new session, preventing WSL2 from killing it when the step's bash session exits. Log server output to /tmp/adaptixserver.log and fail fast with the log if it dies before tests run. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent dfddca7 commit 03a40ce

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/test.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,13 @@ jobs:
114114
shell: wsl-bash {0}
115115
run: |
116116
cd /tmp/adaptixc2/dist
117-
./adaptixserver -profile profile.yaml &
117+
setsid ./adaptixserver -profile profile.yaml > /tmp/adaptixserver.log 2>&1 &
118118
echo $! > /tmp/adaptixc2.pid
119-
sleep 2
119+
for i in $(seq 1 30); do
120+
nc -z 127.0.0.1 4321 2>/dev/null && break
121+
sleep 1
122+
done
123+
nc -z 127.0.0.1 4321 || { echo "AdaptixC2 server did not start within 30s"; cat /tmp/adaptixserver.log; exit 1; }
120124
121125
# ── WSL: install testing kit ─────────────────────────────────────────────
122126

@@ -186,6 +190,11 @@ jobs:
186190
terminate: true
187191
EOF
188192
193+
- name: Check server alive
194+
shell: wsl-bash {0}
195+
run: |
196+
nc -z 127.0.0.1 4321 || { echo "Server down before tests — log:"; cat /tmp/adaptixserver.log; exit 1; }
197+
189198
- name: Run integration tests
190199
shell: wsl-bash {0}
191200
run: |

0 commit comments

Comments
 (0)