Skip to content

test: stabilize queue-owner integration teardown#37

Merged
osolmaz merged 1 commit intoopenclaw:mainfrom
osolmaz:fix/ci-cancel-test-cleanup
Mar 1, 2026
Merged

test: stabilize queue-owner integration teardown#37
osolmaz merged 1 commit intoopenclaw:mainfrom
osolmaz:fix/ci-cancel-test-cleanup

Conversation

@dutifulbob
Copy link
Contributor

@dutifulbob dutifulbob commented Mar 1, 2026

Problem

CI failed intermittently in this job:
https://github.com/openclaw/acpx/actions/runs/22529835998/job/65267489405

Failing test:

  • integration: cancel yields cancelled stopReason without queue error

Observed failure:

  • ENOTEMPTY: directory not empty, rmdir ~/.acpx/sessions

Root cause: detached queue-owner processes could still be active while integration temp-home cleanup ran, causing teardown races.

Changes

  • Added explicit session shutdown in integration tests that start detached queue owners.
  • Added waits for queue-owner PID exit before temp-home cleanup where needed.
  • Added defensive cleanup in the cancel integration test (stop child -> close session -> wait for owner exit).

Scope is test-only; no production/runtime code changes.

Validation

  • npm run lint
  • npm test
  • Reproduced target test repeatedly:
    • npm run build:test && for i in $(seq 1 20); do node --test --test-name-pattern "integration: cancel yields cancelled stopReason without queue error" dist-test/test/integration.test.js || exit 1; done
    • Result: 20/20 passes locally.

@osolmaz osolmaz merged commit 1b1ba72 into openclaw:main Mar 1, 2026
1 check passed
@osolmaz osolmaz deleted the fix/ci-cancel-test-cleanup branch March 1, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants