From 9037ccd355345b5fcdbd42e6c11bcd6749c83092 Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Tue, 9 Jun 2020 12:38:01 -0700 Subject: [PATCH] Add per-test timeout to Cirrus tool general tests (#58649) --- dev/bots/test.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dev/bots/test.dart b/dev/bots/test.dart index 815522a6580..a8d3bb00e03 100644 --- a/dev/bots/test.dart +++ b/dev/bots/test.dart @@ -326,6 +326,8 @@ Future _runToolTests() async { testPaths: [path.join(kTest, '$subshard$kDotShard', suffix)], tableData: bigqueryApi?.tabledata, enableFlutterToolAsserts: true, + // Detect unit test time regressions (poor time delay handling, etc). + perTestTimeout: (subshard == 'general') ? const Duration(seconds: 2) : null, ); }, ); @@ -933,6 +935,7 @@ Future _pubRunTest(String workingDirectory, { String coverage, bq.TabledataResourceApi tableData, bool forceSingleCore = false, + Duration perTestTimeout, }) async { int cpus; final String cpuVariable = Platform.environment['CPU']; // CPU is set in cirrus.yml @@ -964,6 +967,8 @@ Future _pubRunTest(String workingDirectory, { '--no-color', if (coverage != null) '--coverage=$coverage', + if (perTestTimeout != null) + '--timeout=${perTestTimeout.inMilliseconds.toString()}ms', if (testPaths != null) for (final String testPath in testPaths) testPath,