Skip to content

fix: make capturePane tmux integration test more resilient#508

Merged
MichielDean merged 1 commit into
mainfrom
fix/capturepane-flaky-test
May 12, 2026
Merged

fix: make capturePane tmux integration test more resilient#508
MichielDean merged 1 commit into
mainfrom
fix/capturepane-flaky-test

Conversation

@MichielDean
Copy link
Copy Markdown
Owner

Summary

The TestCapturePane_FullScrollback_ReturnsHistoryBeyondVisible integration test was flaky when running in the full cmd/ct suite because of tmux session name collisions and transient server contention.

Changes:

  • Session name now includes a nanosecond suffix (time.Now().UnixNano()%10000) to avoid collisions with other tmux-using tests
  • Added retry logic (3 attempts, 500ms pause) for tmux new-session to handle transient tmux server contention

The test already skips in CI (os.Getenv("CI") != "") — this makes it more reliable for local development.

Add unique session name with nanosecond suffix to avoid collisions
when running alongside other tmux-using tests. Add retry logic for
tmux new-session (3 attempts with 500ms pause) to handle transient
tmux server contention.
@MichielDean MichielDean merged commit 1d1fcea into main May 12, 2026
3 checks passed
@MichielDean MichielDean deleted the fix/capturepane-flaky-test branch May 12, 2026 03:38
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.

1 participant