Repository navigation
Add iOS simulator log parse test - #55808
Merged
Merged
Conversation
Member
Author
|
I can't even find the test now since I get a wall of unrelated errors when I FRoB #55799 |
| when(mockProcess.stderr) | ||
| .thenAnswer((Invocation invocation) => const Stream<List<int>>.empty()); | ||
| // Delay return of exitCode until after stdout stream data, since it terminates the logger. | ||
| when(mockProcess.exitCode) |
Contributor
There was a problem hiding this comment.
Instead of setting up a potential future timing issue, you could structure the test so that you can hold the exit until you have verified the log output:
var completer = Completer<int>();
when(mockProcess.exitCode).thenAnswer((_) {
return completer.future;
});
...
final DeviceLogReader logReader = device.getLogReader(
app: await BuildableIOSApp.fromProject(mockIosProject),
);
await expectLater(logReader.logLines, emitsThrough(...));
completer.complete(0); // not sure if its actually necessary to exit, cloud dispose instead?
Member
Author
|
Swapped to FakeProcessManager in logging tests. |
9 of 10 tasks
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Add a test to parse a log line style tested in g3. I think this corresponds to Xcode 8 (shipped iOS 10) syslog style, but I'm not really sure.
Related Issues
This looks random, but it's the exact log line in g3 that failed to parse when #46838 landed, and caused it to break the roll and be reverted. Add the test now to prove I don't break it again when I merge #55799.
Tests
simulators_test
Checklist
///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change