Clean up device logger and port forwarding on drive completion (#68655)

This commit is contained in:
Jenn Magder 2020-10-20 16:01:51 -07:00 committed by GitHub
parent 8b79906842
commit d29cd9beb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -386,6 +386,8 @@ $ex
globals.printStatus('Stopping application instance.');
await appStopper(this, package);
}
await device?.dispose();
}
return FlutterCommandResult.success();

View File

@ -228,6 +228,7 @@ void main() {
'10',
];
await createTestCommandRunner(command).run(args);
verify(mockDevice.dispose());
expect(testLogger.errorText, isEmpty);
}, overrides: <Type, Generator>{
FileSystem: () => fs,
@ -529,6 +530,7 @@ void main() {
prebuiltApplication: false,
userIdentifier: anyNamed('userIdentifier'),
));
verify(mockDevice.dispose());
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),
@ -558,6 +560,7 @@ void main() {
prebuiltApplication: false,
userIdentifier: anyNamed('userIdentifier'),
));
verify(mockDevice.dispose());
}, overrides: <Type, Generator>{
FileSystem: () => fs,
ProcessManager: () => FakeProcessManager.any(),