Conversation
| group('tap', () { | ||
| test('requires a target reference', () async { | ||
| expect(driver.tap(null), throwsDriverError); | ||
| expect(driver.tap(null), throwsAssertionError); |
There was a problem hiding this comment.
Several of these changed and I'm not entirely sure why.
I'm not super concerned about it though, since before long we'll be migrating this to NNBD and this test will just go away anyway.
There was a problem hiding this comment.
(The test and the entire class of error will change)
| url_launcher_linux: 0.0.1+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" | ||
| url_launcher_macos: 0.0.1+8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" | ||
| url_launcher_platform_interface: 1.0.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" | ||
| url_launcher_platform_interface: 1.0.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" |
There was a problem hiding this comment.
Doesn't this version need to be pinned?
There was a problem hiding this comment.
This PR will fix this issue. I'm working now on getting it green so I can land it.
There was a problem hiding this comment.
Closing the loop here: Mouad published the fix for the build issue. Apologies for the breakage!
jonahwilliams
left a comment
There was a problem hiding this comment.
This is great
We don't really test drive on presubmit though, the unit tests are trivial. To make sure this can land without being reverted I would validate several devicelab tests locally.
Separately, you may need to investigate google3
|
I did run some local driver tests that worked, and a handful of devicelab tests as well. I need to get this through a FRoB run as well, but posting this is a step towards that. |
|
dartdoc crash tracking at dart-lang/dartdoc#2402 |
bkonyi
left a comment
There was a problem hiding this comment.
package:vm_service_client is dead! Long live package:vm_service!
| Future<vms.Timeline> getVMTimeline({int timeOriginMicros, int timeExtentMicros}) async { | ||
| connectionLog.add('getVMTimeline $timeOriginMicros $timeExtentMicros'); | ||
| final vms.Timeline timeline = timelineResponses[timeOriginMicros ?? 1]; | ||
| assert(timeline != null, 'Missing entry in timelineResponses[$timeOriginMicros]'); |
There was a problem hiding this comment.
Do we run with assertions enabled in tests? If we're not sure, maybe it's safer to just throw here.
There was a problem hiding this comment.
Assertions are enabled for tests, yes.
|
I'm still working through testing this internally, requires a few hoops to get vm_service visibility for flutter_driver in the monorepo. |
|
Internal runs are failing because of unrelated changes related to NNBD. I'll wait until that's cleaned up internally and try to re-run the tests. |
#68791 will fix this for Flutter. |
| } | ||
|
|
||
| return isolate.resume().catchError((dynamic e) { | ||
| return await client.resume(isolate.id).catchError((dynamic e) { |
There was a problem hiding this comment.
return await is pointless
| 'Attempted to resume an already resumed isolate. This may happen ' | ||
| 'when we lose a race with another tool (usually a debugger) that ' | ||
| 'is connected to the same isolate.' | ||
| 'when we lose a race with another tool (usually a debugger) that ' |
There was a problem hiding this comment.
nit while you are here: no "we"
| .loadRunnable() | ||
| .then((VMIsolate isolate) async { | ||
| if (isolate.extensionRpcs.contains(_flutterExtensionMethodName)) { | ||
| await client.streamListen(vms.EventStreams.kIsolate); |
There was a problem hiding this comment.
this will throw an exception if the stream has already been subscribed to
There was a problem hiding this comment.
This would be unexpected, since we unsubscribe at the end of this method.
| .sendRequest(_collectAllGarbageMethodName, <String, String>{ | ||
| 'isolateId': 'isolates/${_appIsolate.numberAsString}', | ||
| }); | ||
| await _serviceClient.callMethod(_collectAllGarbageMethodName, isolateId: _appIsolate.id); |
There was a problem hiding this comment.
I believe this method is deprecated and no longer does anything
There was a problem hiding this comment.
We're "not supposed" to use it, but it does work. It's not guaranteed to do anything but it normally works well enough.
We can't remove this - it's used in many of our benchmarks to reduce flakiness.
|
This will be blocked until a resolution to dart-lang/sdk#43898 is rolled into google. |
|
This patch is now passing internally, with some additional updates at cl/338576267 to cover new dependency changes and some internal usages of API that isn't available anymore (specifically, not using the vm_service_client API that we used to expose through this lib). |
|
@renyou -why doesn't FROB let me apply a G3Fix to this PR? It's approved by bkonyi. |
|
|
||
| /// Workaround for isolates being paused by driver tests. | ||
| /// https://github.com/flutter/flutter/issues/24703 | ||
| class IsolatesWorkaround { |
There was a problem hiding this comment.
This was actually fixed by a different patch, but became apparent in this one because it's trying to use API the driver no longer exposes :)
| /// The `fuchsiaModuleTarget` parameter specifies the pattern for determining | ||
| /// which mod to control. When running on a Fuchsia device, either this or the | ||
| /// environment variable `FUCHSIA_MODULE_TARGET` must be set (the environment | ||
| /// variable is treated as a substring pattern). This field will be ignored if |
There was a problem hiding this comment.
Should we also say that this parameter is ignored on non-Fuchsia devices?
| /// `browser` specifies which FlutterDriver implementation to use. If not | ||
| /// speicifed or set to false, [VMServiceFlutterDriver] implementation | ||
| /// will be used. Otherwise, [WebFlutterDriver] implementation will be used. | ||
| /// The `browser` parameter specifies which FlutterDriver implementation to |
There was a problem hiding this comment.
I'm failing to find the browser parameter this part is talking about 🤔
There was a problem hiding this comment.
Looks like someone removed that and forgot to remove the docs. Removing this block.
| isolate.pauseEvent is! VMPauseInterruptedEvent && | ||
| isolate.pauseEvent is! VMResumeEvent) { | ||
| isolate = await isolateRef.loadRunnable(); | ||
| if (isolate.pauseEvent.kind == vms.EventKind.kNone) { |
|
Note to self or anyone else looking at this due to a devicelab failure: I did not run all devicelab tests. We should feel free to aggressively revert this if it's causing devicelab failures. That said, if we need to revert we should ideally do so before it rolls into google3, as that will complicate reverts. |
|
All tests that CI should be able to catch are passing - will watch devicelab. |
This reverts commit 3ecac30. Co-authored-by: Dan Field <[email protected]>
…" (flutter#69077)" (flutter#69089)" This reverts commit e581475.
Migrates package:flutter_driver to use package:vm_service.
This will be needed to eventually completely migrate flutter_driver to null safety. To that end, I've also rewritten the tests to not use mockito.
Part of #37499
Fixes #31813 since package:vm_service is now in charge of that behavior.