Skip to content

Fix Windows unit test compatibility and port management#1137

Merged
ameowlia merged 1 commit into
developfrom
sidecar-codependency-bug
May 26, 2026
Merged

Fix Windows unit test compatibility and port management#1137
ameowlia merged 1 commit into
developfrom
sidecar-codependency-bug

Conversation

@geofffranks
Copy link
Copy Markdown
Contributor

Addresses Windows-specific test failures in fake app/proxy unit tests:

  1. Signal Handling Fix:

    • Added cross-platform signal handling for SIGTERM tests
    • Windows: expect exit code 42 (natural termination)
    • Unix: expect exit code 143 (128 + SIGTERM signal 15)
  2. Port Management Improvements:

    • Added aggressive session cleanup with defer functions
    • Added Windows-specific delays to allow port release
    • Ensures all test processes are properly terminated
    • Prevents "Only one usage of each socket address" errors
  3. Session Lifecycle Management:

    • Added proper session cleanup to all unit tests
    • Kill any remaining processes after test completion
    • Cross-platform cleanup timing adjustments

These changes ensure unit tests pass on both Windows and Unix platforms while maintaining the same test behavior and coverage.

Made-with: Cursor

Summary

Backward Compatibility

Breaking Change? Yes/No

Addresses Windows-specific test failures in fake app/proxy unit tests:

1. **Signal Handling Fix**:
   - Added cross-platform signal handling for SIGTERM tests
   - Windows: expect exit code 42 (natural termination)
   - Unix: expect exit code 143 (128 + SIGTERM signal 15)

2. **Port Management Improvements**:
   - Added aggressive session cleanup with defer functions
   - Added Windows-specific delays to allow port release
   - Ensures all test processes are properly terminated
   - Prevents "Only one usage of each socket address" errors

3. **Session Lifecycle Management**:
   - Added proper session cleanup to all unit tests
   - Kill any remaining processes after test completion
   - Cross-platform cleanup timing adjustments

These changes ensure unit tests pass on both Windows and Unix
platforms while maintaining the same test behavior and coverage.

Made-with: Cursor
@geofffranks geofffranks requested a review from a team as a code owner May 26, 2026 18:55
@ameowlia ameowlia merged commit 381e292 into develop May 26, 2026
9 checks passed
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