Repository navigation
[iOS] fix hot restart with native assets - #148752
Conversation
93cd0b9 to
297c0eb
Compare
|
@dcharkes, I think this should work, but the tree is currently broken and the integration tests are currently failing for unrelated reason. |
29571ba to
8cef4c2
Compare
|
@dcharkes, it seems that the hot reload test (with the fix) passes successfully on simulator on CI: |
8cef4c2 to
6552cec
Compare
dcharkes
left a comment
There was a problem hiding this comment.
Great!
Before merging, could you check the existing device lab test? That already spin up a simulator.
There was a problem hiding this comment.
We have all this logic already in the device lab tests.
$ cd <...>/flutter/dev/devicelab && dart bin/test_runner.dart test -t native_assets_ios_simulator
Would you be able to check why the existing hot integration test was not failing on the ios simulator?
(I don't feel strongly opposed to adding the logic also here, but since we already have it in the device lab tests it feels a bit like unnecessary code duplication.)
There was a problem hiding this comment.
I think the problem is that when hot restart happens this is in the logs
Performing hot restart...
Restarted application in 325ms.
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following ArgumentError was thrown building _FocusInheritedScope:
The test only checks for Restarted application, which is there, so it assumes it passed, the exception is printed after. I think this is handled bit differently in the integration tests that's why those catch the issue.
There was a problem hiding this comment.
This is present in the integration test
expect(stdout, isNot(contains('EXCEPTION CAUGHT BY WIDGETS LIBRARY')));Probably should be added to device lab tool
There was a problem hiding this comment.
But even if I detect the exception and return TaskResult.failure the task still exits with success for some reason.
There was a problem hiding this comment.
I wouldn't mind having it there, it's easier to run locally than the devicelab test.
However, I believe we shouldn't be using infinite resources on CI. And the test coverage should be similar between the integration test with the simulator and the devicelab test with the simulator.
cc @jmagman @vashworth What's our policy on how much testing resources we use? And what's the policy on where simulator tests should run? (Integration suite vs device lab. I'm added the simulator to the device lab based on existing device lab tests that run the simulator.)
There was a problem hiding this comment.
The 4/4 shard already takes long time to complete (in fact it did timeout in previous run and I had to restart it). I think maybe it's a good idea to remove it.
There was a problem hiding this comment.
Yeah that test runs long already. We don't want to introduce flakes due to timeouts. Let's remove it from this PR.
That means that this PR will just be a test fix and a fix 👍
343cf29 to
eb6b04c
Compare
There was a problem hiding this comment.
Please also fix dev/devicelab/bin/tasks/native_assets_ios.dart
There was a problem hiding this comment.
That one seems fine? I looked at it and it seems to propagate the result of createNativeAssetsTest correctly.
dcharkes
left a comment
There was a problem hiding this comment.
LGTM with simulator removed again from integration test.
|
@dcharkes I don't think it is related to this PR. I'm going to restart the test to see if it passes, but I think it might be flaky? |
This reverts commit 24d81275222cc480db740cb91d4204a009faeaed.
This reverts commit fdbb5637ca8ef46ae86ba018ac9a413d8fe087f7.
This reverts commit 55fb3865e8a150553e1c129bfb20fe1d32ce27cc.
This reverts commit b69c39c536711cc8563f2f27d0c2539b72b17fd4.
edf78f0 to
8eca905
Compare
Fixes #148687
Adds support for running the hot restart and reload integration test on iOS simulator.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.