Repository navigation
test(zero-swift): show the test server's side when an app lifecycle test times out - #115
Merged
Merged
Conversation
…est times out The lifecycle tests' flake on the iOS Simulator (4 of about 60 macOS runs) shows only the client's log: it sent the WebSocket upgrade and never logged the socket opening, then timed out after 10 s, as the test did. The local server's view, whether it accepted the connection and the upgrade finished, wasn't recorded, so which side stalls is unknown. The server now writes its listener and connection events to the same log the failure prints. Amp-Thread-ID: https://ampcode.com/threads/T-c513a037-a257-45e0-b9a9-15c15edfe859 Co-authored-by: tmm <tmm@tmm.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The app lifecycle tests time out now and then in the iOS Simulator: 4 of about 60 recent "Swift end-to-end (macOS)" runs, a different test each time. The test either waits for "connected" or for "the socket closed".
In both of the failures that wait for "connected", the client logged "Connecting to ws://127.0.0.1:…" and "Waiting for connection to be acknowledged". It never logged "Got socket open event", so the WebSocket upgrade to the test's local server never finished. In one of them, the client retried after its 10-second connect timeout, as it should. The test also gives up after 10 seconds, so it fails before that retry.
What's missing is the server's side: whether the listener accepted the connection, and whether it reached ready. This PR writes the server's listener and connection events to the same log the failure prints, so the next failure shows which side stalled.
It doesn't change any timeouts, because the cause isn't known yet.
Checked on a macOS 27 Mac:
server: accepted,preparing,readyandopennext to the client's lines.Test-only, so no changeset.