From 36cfcfe33ff42ffbaabbbe4f15871c64d20c0277 Mon Sep 17 00:00:00 2001 From: Jia Hao Goh Date: Fri, 29 Jan 2021 09:42:42 +0800 Subject: [PATCH 1/2] [integration_test] Fix tests --- packages/integration_test/test/binding_fail_test.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/integration_test/test/binding_fail_test.dart b/packages/integration_test/test/binding_fail_test.dart index bb5961b18fc7..7ec176897c0c 100644 --- a/packages/integration_test/test/binding_fail_test.dart +++ b/packages/integration_test/test/binding_fail_test.dart @@ -61,13 +61,18 @@ Future> _runTest(String scriptPath) async { final String testResults = (await process.stdout .transform(utf8.decoder) .expand((String text) => text.split('\n')) - .map((String line) { + .map((String line) { try { return jsonDecode(line); } on FormatException { // Only interested in test events which are JSON. } }) + .expand>((dynamic json) { + return json is List + ? json.cast() + : >[json as Map]; + }) .where((dynamic testEvent) => testEvent != null && testEvent['type'] == 'print') .map((dynamic printEvent) => printEvent['message'] as String) From abf151ef808b5e93f2d122f0a84d5e104ba95992 Mon Sep 17 00:00:00 2001 From: Jia Hao Goh Date: Fri, 29 Jan 2021 09:51:47 +0800 Subject: [PATCH 2/2] Bump version --- packages/integration_test/CHANGELOG.md | 4 ++++ packages/integration_test/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/integration_test/CHANGELOG.md b/packages/integration_test/CHANGELOG.md index 5ae0883ed081..71ab0e86266b 100644 --- a/packages/integration_test/CHANGELOG.md +++ b/packages/integration_test/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.2+2 + +* Fix tests from changes to `flutter test` machine output. + ## 1.0.2+1 * Update vm_service constraint diff --git a/packages/integration_test/pubspec.yaml b/packages/integration_test/pubspec.yaml index a233f066ea37..33c174a9724a 100644 --- a/packages/integration_test/pubspec.yaml +++ b/packages/integration_test/pubspec.yaml @@ -1,6 +1,6 @@ name: integration_test description: Runs tests that use the flutter_test API as integration tests. -version: 1.0.2+1 +version: 1.0.2+2 homepage: https://github.com/flutter/plugins/tree/master/packages/integration_test environment: