Unverified Commit 9037ccd3 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Add per-test timeout to Cirrus tool general tests (#58649)

parent f7d2bcdf
...@@ -326,6 +326,8 @@ Future<void> _runToolTests() async { ...@@ -326,6 +326,8 @@ Future<void> _runToolTests() async {
testPaths: <String>[path.join(kTest, '$subshard$kDotShard', suffix)], testPaths: <String>[path.join(kTest, '$subshard$kDotShard', suffix)],
tableData: bigqueryApi?.tabledata, tableData: bigqueryApi?.tabledata,
enableFlutterToolAsserts: true, 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<void> _pubRunTest(String workingDirectory, { ...@@ -933,6 +935,7 @@ Future<void> _pubRunTest(String workingDirectory, {
String coverage, String coverage,
bq.TabledataResourceApi tableData, bq.TabledataResourceApi tableData,
bool forceSingleCore = false, bool forceSingleCore = false,
Duration perTestTimeout,
}) async { }) async {
int cpus; int cpus;
final String cpuVariable = Platform.environment['CPU']; // CPU is set in cirrus.yml final String cpuVariable = Platform.environment['CPU']; // CPU is set in cirrus.yml
...@@ -964,6 +967,8 @@ Future<void> _pubRunTest(String workingDirectory, { ...@@ -964,6 +967,8 @@ Future<void> _pubRunTest(String workingDirectory, {
'--no-color', '--no-color',
if (coverage != null) if (coverage != null)
'--coverage=$coverage', '--coverage=$coverage',
if (perTestTimeout != null)
'--timeout=${perTestTimeout.inMilliseconds.toString()}ms',
if (testPaths != null) if (testPaths != null)
for (final String testPath in testPaths) for (final String testPath in testPaths)
testPath, testPath,
......
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