Unverified Commit 35000147 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Re-add tool test general per-test timeout (#74531)

parent 92427f26
...@@ -301,6 +301,8 @@ Future<void> _runToolTests() async { ...@@ -301,6 +301,8 @@ Future<void> _runToolTests() async {
forceSingleCore: subshard != 'general', forceSingleCore: subshard != 'general',
testPaths: <String>[path.join(kTest, '$subshard$kDotShard', suffix)], testPaths: <String>[path.join(kTest, '$subshard$kDotShard', suffix)],
enableFlutterToolAsserts: subshard != 'general', enableFlutterToolAsserts: subshard != 'general',
// Detect unit test time regressions (poor time delay handling, etc).
perTestTimeout: (subshard == 'general') ? const Duration(seconds: 2) : null,
); );
}, },
); );
......
...@@ -587,7 +587,7 @@ void main() { ...@@ -587,7 +587,7 @@ void main() {
expect(result.code, 1); expect(result.code, 1);
expect(result.message, contains('Device initialization has not completed.')); expect(result.message, contains('Device initialization has not completed.'));
expect(fakeVmServiceHost.hasRemainingExpectations, false); expect(fakeVmServiceHost.hasRemainingExpectations, false);
})); }), timeout: const Timeout(Duration(seconds: 15))); // https://github.com/flutter/flutter/issues/74539
testUsingContext('ResidentRunner can handle an reload-barred exception from hot reload', () => testbed.run(() async { testUsingContext('ResidentRunner can handle an reload-barred exception from hot reload', () => testbed.run(() async {
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[ fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[
......
...@@ -58,6 +58,7 @@ void testUsingContext( ...@@ -58,6 +58,7 @@ void testUsingContext(
Map<Type, Generator> overrides = const <Type, Generator>{}, Map<Type, Generator> overrides = const <Type, Generator>{},
bool initializeFlutterRoot = true, bool initializeFlutterRoot = true,
String testOn, String testOn,
Timeout timeout,
bool skip, // should default to `false`, but https://github.com/dart-lang/test/issues/545 doesn't allow this bool skip, // should default to `false`, but https://github.com/dart-lang/test/issues/545 doesn't allow this
}) { }) {
if (overrides[FileSystem] != null && overrides[ProcessManager] == null) { if (overrides[FileSystem] != null && overrides[ProcessManager] == null) {
...@@ -174,7 +175,7 @@ void testUsingContext( ...@@ -174,7 +175,7 @@ void testUsingContext(
// BotDetector implementation in the overrides. // BotDetector implementation in the overrides.
BotDetector: overrides[BotDetector] ?? () => const AlwaysTrueBotDetector(), BotDetector: overrides[BotDetector] ?? () => const AlwaysTrueBotDetector(),
}); });
}, testOn: testOn, skip: skip); }, testOn: testOn, skip: skip, timeout: timeout);
} }
void _printBufferedErrors(AppContext testContext) { void _printBufferedErrors(AppContext testContext) {
......
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