fix: Fix possible concurrency issue with secondary app startup#215
Merged
fix: Fix possible concurrency issue with secondary app startup#215
Conversation
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.
linked https://github.com/unoplatform/private/issues/926
PR Type
What kind of change does this PR introduce?
What is the current behavior?
DevServer.StartCore()starts the dev-server process and returns immediately without waiting for the HTTP endpoint to be ready. WhenSecondaryApp.RunTest()then launches the child app, the child'sRemoteControlClientmay attempt toconnect before the server is listening. Since
RemoteControlClientdoes not retry if the initial connection attempt fails, the child app permanently fails to connect, and the hot-reload test times out waiting for the workspace to load.What is the new behavior?
DevServer.StartCore()now polls the dev-server port with a TCP connect loop (100ms interval, 30s timeout) before returning. This ensures the HTTP endpoint is accepting connections before the child app is launched.PR Checklist
Tested code with current supported SDKs
Docs have been added/updated which fit documentation template. (for bug fixes / features)
Unit Tests and/or UI Tests for the changes have been added (for bug fixes / features) (if applicable)
Wasm UI Tests are not showing unexpected any differences. Validate PR
Screenshots Compare Test Runresults.Contains NO breaking changes
Updated the Release Notes
Associated with an issue (GitHub or internal)
Other information
Discovered while setting up
[RunsInSecondaryApp]hot-reload runtime tests for Uno Toolkit and Uno Extensions. The race condition is timing-dependent and reproduces more reliably on CI agents.