Skip to content

Commit 782baec

Browse files
Resolve 113705: Separated longer running tests from runMisc to prevent flakiness from timeouts (#113784)
1 parent 07319a9 commit 782baec

File tree

2 files changed

+39
-4
lines changed

2 files changed

+39
-4
lines changed

.ci.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,32 @@ targets:
377377
- bin/
378378
- .ci.yaml
379379

380+
- name: Linux framework_tests_slow
381+
bringup: true
382+
recipe: flutter/flutter_drone
383+
timeout: 60
384+
properties:
385+
dependencies: >-
386+
[
387+
{"dependency": "android_sdk", "version": "version:33v6"}
388+
]
389+
shard: framework_tests
390+
subshard: slow
391+
tags: >
392+
["framework", "hostonly", "shard", "linux"]
393+
runIf:
394+
- dev/
395+
- packages/flutter/
396+
- packages/flutter_driver/
397+
- packages/integration_test/
398+
- packages/flutter_localizations/
399+
- packages/fuchsia_remote_debug_protocol/
400+
- packages/flutter_test/
401+
- packages/flutter_goldens/
402+
- packages/flutter_tools/
403+
- bin/
404+
- .ci.yaml
405+
380406
- name: Linux framework_tests_misc
381407
recipe: flutter/flutter_drone
382408
timeout: 60

dev/bots/test.dart

+13-4
Original file line numberDiff line numberDiff line change
@@ -965,14 +965,25 @@ Future<void> _runFrameworkTests() async {
965965
);
966966
}
967967

968+
// Tests that take longer than average to run. This is usually because they
969+
// need to compile something large or make use of the analyzer for the test.
970+
// These tests need to be platform agnostic as they are only run on a linux
971+
// machine to save on execution time and cost.
972+
Future<void> runSlow() async {
973+
printProgress('${green}Running slow package tests$reset for directories other than packages/flutter');
974+
await runTracingTests();
975+
await runFixTests();
976+
await runPrivateTests();
977+
}
978+
968979
Future<void> runMisc() async {
969980
printProgress('${green}Running package tests$reset for directories other than packages/flutter');
970981
await _runTestHarnessTests();
971982
await runExampleTests();
972983
await _runDartTest(path.join(flutterRoot, 'dev', 'bots'));
973984
await _runDartTest(path.join(flutterRoot, 'dev', 'devicelab'), ensurePrecompiledTool: false); // See https://github.com/flutter/flutter/issues/86209
974985
await _runDartTest(path.join(flutterRoot, 'dev', 'conductor', 'core'), forceSingleCore: true);
975-
// TODO(gspencergoog): Remove the exception for fatalWarnings once https://github.com/flutter/flutter/pull/91127 has landed.
986+
// TODO(gspencergoog): Remove the exception for fatalWarnings once https://github.com/flutter/flutter/issues/113782 has landed.
976987
await _runFlutterTest(path.join(flutterRoot, 'dev', 'integration_tests', 'android_semantics_testing'), fatalWarnings: false);
977988
await _runFlutterTest(path.join(flutterRoot, 'dev', 'integration_tests', 'ui'));
978989
await _runFlutterTest(path.join(flutterRoot, 'dev', 'manual_tests'));
@@ -991,9 +1002,6 @@ Future<void> _runFrameworkTests() async {
9911002
await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_test'), options: soundNullSafetyOptions);
9921003
await _runFlutterTest(path.join(flutterRoot, 'packages', 'fuchsia_remote_debug_protocol'), options: soundNullSafetyOptions);
9931004
await _runFlutterTest(path.join(flutterRoot, 'dev', 'integration_tests', 'non_nullable'), options: mixedModeNullSafetyOptions);
994-
await runTracingTests();
995-
await runFixTests();
996-
await runPrivateTests();
9971005
const String httpClientWarning =
9981006
'Warning: At least one test in this suite creates an HttpClient. When\n'
9991007
'running a test suite that uses TestWidgetsFlutterBinding, all HTTP\n'
@@ -1023,6 +1031,7 @@ Future<void> _runFrameworkTests() async {
10231031
await selectSubshard(<String, ShardRunner>{
10241032
'widgets': runWidgets,
10251033
'libraries': runLibraries,
1034+
'slow': runSlow,
10261035
'misc': runMisc,
10271036
});
10281037
}

0 commit comments

Comments
 (0)