Unverified Commit d31c250e authored by Christopher Fujino's avatar Christopher Fujino Committed by GitHub

[flutter_tools] Fix leaky test (#105927)

parent 712860d3
...@@ -145,12 +145,14 @@ void main() { ...@@ -145,12 +145,14 @@ void main() {
MemoryFileSystem fs; MemoryFileSystem fs;
Artifacts artifacts; Artifacts artifacts;
TestUsage usage; TestUsage usage;
FakeAnsiTerminal fakeTerminal;
setUpAll(() { setUpAll(() {
Cache.disableLocking(); Cache.disableLocking();
}); });
setUp(() { setUp(() {
fakeTerminal = FakeAnsiTerminal();
artifacts = Artifacts.test(); artifacts = Artifacts.test();
usage = TestUsage(); usage = TestUsage();
fs = MemoryFileSystem.test(); fs = MemoryFileSystem.test();
...@@ -429,6 +431,7 @@ void main() { ...@@ -429,6 +431,7 @@ void main() {
}) })
))); )));
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
AnsiTerminal: () => fakeTerminal,
Artifacts: () => artifacts, Artifacts: () => artifacts,
Cache: () => Cache.test(processManager: FakeProcessManager.any()), Cache: () => Cache.test(processManager: FakeProcessManager.any()),
DeviceManager: () => mockDeviceManager, DeviceManager: () => mockDeviceManager,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment