Fix race condition in flutter test when passing --serve-observatory#123556
Fix race condition in flutter test when passing --serve-observatory#123556
Conversation
`flutter test` wasn't awaiting the `_serveObservatory` request which was causing a race condition in the 'flutter test should respect --serve-observatory' test in `test/integration.general/test_test.dart`. Related to #123516
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
Working on fixing some additional failures, just need to stub out some VM service functionality. |
|
|
||
| logger.printTrace('Connecting to service protocol: $forwardingUri'); | ||
| final Future<FlutterVmService> localVmService = connectToVmService( | ||
| final FlutterVmService vmService = await connectToVmServiceImpl( |
There was a problem hiding this comment.
Can you write a regression test? Maybe by making the anonymous closure starting on line 158 a @visibleForTesting method?
There was a problem hiding this comment.
This test should already cover this (it was the test that started failing due to this issue when this CL disabling Observatory by default landed in the SDK).
This reverts commit fa0c81e. Requires flutter/flutter#123556 to have landed. TEST=Existing tests Change-Id: I40b9e11a89fd66ec511d31a385192e577899fca3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296640 Reviewed-by: Siva Annamalai <[email protected]> Commit-Queue: Ben Konyi <[email protected]>
flutter testwasn't awaiting the_serveObservatoryrequest which was causing a race condition in theflutter test should respect --serve-observatorytest intest/integration.general/test_test.dart.Related to #123516