Skip to content

Stabilize gateway rejection assertions in GatewayTest - #3507

Open
wborn wants to merge 2 commits into
mainfrom
fix-GatewayTest-stability
Open

wborn wants to merge 2 commits into
mainfrom
fix-GatewayTest-stability

Conversation

@wborn

@wborn wborn commented Oct 29, 2026

Copy link
Copy Markdown
Member

Description

Replace reconnect-count assertions with checks for the manager's UNRECOGNISED rejection and completion of session cleanup. Requiring six CONNECTING and CONNECTED transitions within 15 seconds depended on retry timing and whether socket closure occurred before CONNECTED was reported.

Observe rejection server-side because the asynchronous disconnect message can race with socket closure and never reach the client. Wait for session cleanup before checking connector state and proceeding to the next attempt.

Verify that the legitimate gateway session remains intact and that the rogue client cannot establish a gateway session or start synchronization. These checks assert the intended behavior without depending on reconnect frequency or disconnect-message delivery.

Closes #1416

Checklist

  • 1. Acceptance criteria of the linked issue(s) are met
  • 2. Tests are written and all tests pass
  • 3. Changes are manually tested by you and the reviewer
  • 4. Documentation is written or updated

Replace reconnect-count assertions with checks for the manager's UNRECOGNISED rejection and completion of session cleanup.
Requiring six CONNECTING and CONNECTED transitions within 15 seconds depended on retry timing and whether socket closure occurred before CONNECTED was reported.

Observe rejection server-side because the asynchronous disconnect message can race with socket closure and never reach the client.
Wait for session cleanup before checking connector state and proceeding to the next attempt.

Verify that the legitimate gateway session remains intact and that the rogue client cannot establish a gateway session or start synchronization.
These checks assert the intended behavior without depending on reconnect frequency or disconnect-message delivery.

Closes #1416
@wborn
wborn requested a review from a team October 29, 2026 14:18
@wborn wborn added the Test Development of missing or unstable test label Oct 29, 2026
@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Test Development of missing or unstable test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GatewayTest is unstable

1 participant