From 782baecc5046996507e0cacfdc33ec32da62285c Mon Sep 17 00:00:00 2001 From: pdblasi-google <109253501+pdblasi-google@users.noreply.github.com> Date: Fri, 21 Oct 2022 09:02:14 -0700 Subject: [PATCH] Resolve 113705: Separated longer running tests from `runMisc` to prevent flakiness from timeouts (#113784) --- .ci.yaml | 26 ++++++++++++++++++++++++++ dev/bots/test.dart | 17 +++++++++++++---- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index 11f667ac6c..346647ff0f 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -377,6 +377,32 @@ targets: - bin/ - .ci.yaml + - name: Linux framework_tests_slow + bringup: true + recipe: flutter/flutter_drone + timeout: 60 + properties: + dependencies: >- + [ + {"dependency": "android_sdk", "version": "version:33v6"} + ] + shard: framework_tests + subshard: slow + tags: > + ["framework", "hostonly", "shard", "linux"] + runIf: + - dev/ + - packages/flutter/ + - packages/flutter_driver/ + - packages/integration_test/ + - packages/flutter_localizations/ + - packages/fuchsia_remote_debug_protocol/ + - packages/flutter_test/ + - packages/flutter_goldens/ + - packages/flutter_tools/ + - bin/ + - .ci.yaml + - name: Linux framework_tests_misc recipe: flutter/flutter_drone timeout: 60 diff --git a/dev/bots/test.dart b/dev/bots/test.dart index 6802968ca4..cdf28f9c47 100644 --- a/dev/bots/test.dart +++ b/dev/bots/test.dart @@ -965,6 +965,17 @@ Future _runFrameworkTests() async { ); } + // Tests that take longer than average to run. This is usually because they + // need to compile something large or make use of the analyzer for the test. + // These tests need to be platform agnostic as they are only run on a linux + // machine to save on execution time and cost. + Future runSlow() async { + printProgress('${green}Running slow package tests$reset for directories other than packages/flutter'); + await runTracingTests(); + await runFixTests(); + await runPrivateTests(); + } + Future runMisc() async { printProgress('${green}Running package tests$reset for directories other than packages/flutter'); await _runTestHarnessTests(); @@ -972,7 +983,7 @@ Future _runFrameworkTests() async { await _runDartTest(path.join(flutterRoot, 'dev', 'bots')); await _runDartTest(path.join(flutterRoot, 'dev', 'devicelab'), ensurePrecompiledTool: false); // See https://github.com/flutter/flutter/issues/86209 await _runDartTest(path.join(flutterRoot, 'dev', 'conductor', 'core'), forceSingleCore: true); - // TODO(gspencergoog): Remove the exception for fatalWarnings once https://github.com/flutter/flutter/pull/91127 has landed. + // TODO(gspencergoog): Remove the exception for fatalWarnings once https://github.com/flutter/flutter/issues/113782 has landed. await _runFlutterTest(path.join(flutterRoot, 'dev', 'integration_tests', 'android_semantics_testing'), fatalWarnings: false); await _runFlutterTest(path.join(flutterRoot, 'dev', 'integration_tests', 'ui')); await _runFlutterTest(path.join(flutterRoot, 'dev', 'manual_tests')); @@ -991,9 +1002,6 @@ Future _runFrameworkTests() async { await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_test'), options: soundNullSafetyOptions); await _runFlutterTest(path.join(flutterRoot, 'packages', 'fuchsia_remote_debug_protocol'), options: soundNullSafetyOptions); await _runFlutterTest(path.join(flutterRoot, 'dev', 'integration_tests', 'non_nullable'), options: mixedModeNullSafetyOptions); - await runTracingTests(); - await runFixTests(); - await runPrivateTests(); const String httpClientWarning = 'Warning: At least one test in this suite creates an HttpClient. When\n' 'running a test suite that uses TestWidgetsFlutterBinding, all HTTP\n' @@ -1023,6 +1031,7 @@ Future _runFrameworkTests() async { await selectSubshard({ 'widgets': runWidgets, 'libraries': runLibraries, + 'slow': runSlow, 'misc': runMisc, }); }