You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(sdk): make daemon-restart activity E2E wait for lease release #1386
The TypeScript SDK offline E2E test a daemon restart mid-watch resumes from the cursor across a new run is timing-sensitive at teardown. After restarting mecated, its cleanup calls Session.delete(), but the server sometimes rejects that call because the session lease is still owned by the earlier daemon:
server: session is leased by another process: "<session-id>"
The test therefore fails after its substantive restart/watch assertions, during cleanup.
The job's generated-contract freshness check, SDK build, and 28 other SDK E2E tests passed.
Expected behavior
The restart scenario should not attempt teardown until the old daemon's lease has been released, or until the restarted daemon has safely taken/reconciled lease ownership. The test must be deterministic rather than depending on process/lease timing.
Actual behavior
Teardown races lease release and gets FAILED_PRECONDITION / session_leased_elsewhere.
Scope
Determine whether the production daemon shutdown/restart path delays lease release, whether the test harness fails to await it, or both.
Make the E2E scenario explicitly synchronize on the appropriate lifecycle condition; do not hide the failure with an arbitrary sleep or by broadly ignoring delete errors.
Activity