Unverified Commit 8a8616f9 authored by Zachary Anderson's avatar Zachary Anderson Committed by GitHub

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.
parent 6200026a
...@@ -507,6 +507,13 @@ class FlutterLocalFileComparator extends FlutterGoldenFileComparator with LocalC ...@@ -507,6 +507,13 @@ class FlutterLocalFileComparator extends FlutterGoldenFileComparator with LocalC
'SocketException occurred, could not reach Gold. ' 'SocketException occurred, could not reach Gold. '
'Switching to FlutterSkippingGoldenFileComparator.', '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); return FlutterLocalFileComparator(baseDirectory.uri, goldens);
......
...@@ -1160,6 +1160,16 @@ void main() { ...@@ -1160,6 +1160,16 @@ void main() {
baseDirectory: fakeDirectory, baseDirectory: fakeDirectory,
); );
expect(comparator.runtimeType, FlutterSkippingFileComparator); 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 // reset property or it will carry on to other tests
fakeSkiaClient.getExpectationForTestThrowable = null; fakeSkiaClient.getExpectationForTestThrowable = null;
}); });
......
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