mirror of
https://github.com/flutter/flutter
synced 2024-08-24 18:36:03 +00:00
Handle FormatException from SkiaGoldClient (#143755)
Seen in https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20Framework%20Smoke%20Tests/17183/overview closing the engine tree.
This commit is contained in:
parent
6200026a6d
commit
8a8616f913
|
@ -507,6 +507,13 @@ class FlutterLocalFileComparator extends FlutterGoldenFileComparator with LocalC
|
|||
'SocketException occurred, could not reach Gold. '
|
||||
'Switching to FlutterSkippingGoldenFileComparator.',
|
||||
);
|
||||
} on FormatException catch (_) {
|
||||
return FlutterSkippingFileComparator(
|
||||
baseDirectory.uri,
|
||||
goldens,
|
||||
'FormatException occurred, could not reach Gold. '
|
||||
'Switching to FlutterSkippingGoldenFileComparator.',
|
||||
);
|
||||
}
|
||||
|
||||
return FlutterLocalFileComparator(baseDirectory.uri, goldens);
|
||||
|
|
|
@ -1160,6 +1160,16 @@ void main() {
|
|||
baseDirectory: fakeDirectory,
|
||||
);
|
||||
expect(comparator.runtimeType, FlutterSkippingFileComparator);
|
||||
|
||||
fakeSkiaClient.getExpectationForTestThrowable = const FormatException("Can't reach Gold");
|
||||
|
||||
comparator = await FlutterLocalFileComparator.fromDefaultComparator(
|
||||
platform,
|
||||
goldens: fakeSkiaClient,
|
||||
baseDirectory: fakeDirectory,
|
||||
);
|
||||
expect(comparator.runtimeType, FlutterSkippingFileComparator);
|
||||
|
||||
// reset property or it will carry on to other tests
|
||||
fakeSkiaClient.getExpectationForTestThrowable = null;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue