diff --git a/testing/benchmark/bin/parse_and_send.dart b/testing/benchmark/bin/parse_and_send.dart index 64af78eb26099..55d8948a399c6 100644 --- a/testing/benchmark/bin/parse_and_send.dart +++ b/testing/benchmark/bin/parse_and_send.dart @@ -41,15 +41,18 @@ Future connectFlutterDestination() async { const String kTokenPath = 'TOKEN_PATH'; const String kGcpProject = 'GCP_PROJECT'; final Map env = Platform.environment; + final bool isTesting = env['IS_TESTING'] == 'true'; if (env.containsKey(kTokenPath) && env.containsKey(kGcpProject)) { return FlutterDestination.makeFromAccessToken( File(env[kTokenPath]).readAsStringSync(), env[kGcpProject], + isTesting: isTesting, ); } return await FlutterDestination.makeFromCredentialsJson( jsonDecode(Platform.environment['BENCHMARK_GCP_CREDENTIALS']) as Map, + isTesting: isTesting, ); } diff --git a/testing/benchmark/pubspec.yaml b/testing/benchmark/pubspec.yaml index 37e51ba42f892..2f4e4d6492d81 100644 --- a/testing/benchmark/pubspec.yaml +++ b/testing/benchmark/pubspec.yaml @@ -3,7 +3,7 @@ name: flutter_engine_benchmark dependencies: git: any - metrics_center: 0.0.4 + metrics_center: 0.0.8 dev_dependencies: test: any diff --git a/testing/benchmark/test/parse_and_send_test.dart b/testing/benchmark/test/parse_and_send_test.dart index 6db1aded44e8e..2e60118b98079 100644 --- a/testing/benchmark/test/parse_and_send_test.dart +++ b/testing/benchmark/test/parse_and_send_test.dart @@ -24,6 +24,7 @@ void main() { 'example/txt_benchmarks.json', ], environment: { 'BENCHMARK_GCP_CREDENTIALS': testCred, + 'IS_TESTING': 'true', }); }); @@ -44,6 +45,7 @@ void main() { ], environment: { 'TOKEN_PATH': tokenPath, 'GCP_PROJECT': testCred['project_id'] as String, + 'IS_TESTING': 'true', }); expect(result.exitCode, 0); });