This reverts commit 7cdc23b3e1.
The failure in the `native_assets_test` integration test on Windows was caused by the DevTools process not being shutdown by the `ColdRunner` when running the profile mode portion of the test. This resulted in the test being unable to clean up the project created by the test as DevTools was still holding onto a handle within the directory. This PR adds back the mistakenly removed DevTools shutdown logic in the `ColdRunner`.
This commit is contained in:
@@ -9,6 +9,8 @@ import 'package:flutter_tools/src/build_info.dart';
|
||||
import 'package:flutter_tools/src/device.dart';
|
||||
import 'package:flutter_tools/src/project.dart';
|
||||
|
||||
import 'fakes.dart';
|
||||
|
||||
/// A list of fake devices to test JSON serialization
|
||||
/// (`Device.toJson()` and `--machine` flag for `devices` command)
|
||||
List<FakeDeviceJsonData> fakeDevices = <FakeDeviceJsonData>[
|
||||
@@ -129,6 +131,7 @@ class FakeDevice extends Device {
|
||||
platformType: type,
|
||||
category: Category.mobile,
|
||||
ephemeral: ephemeral,
|
||||
logger: FakeLogger(),
|
||||
);
|
||||
|
||||
final bool _isSupported;
|
||||
|
||||
@@ -741,6 +741,12 @@ class FakeDevtoolsLauncher extends Fake implements DevtoolsLauncher {
|
||||
}
|
||||
}
|
||||
|
||||
/// A fake [Logger] that throws the [Invocation] for any method call.
|
||||
class FakeLogger implements Logger {
|
||||
@override
|
||||
dynamic noSuchMethod(Invocation invocation) => throw invocation; // ignore: only_throw_errors
|
||||
}
|
||||
|
||||
class ClosedStdinController extends Fake implements StreamSink<List<int>> {
|
||||
@override
|
||||
Future<Object?> addStream(Stream<List<int>> stream) async => throw const SocketException('Bad pipe');
|
||||
|
||||
Reference in New Issue
Block a user