diff --git a/packages/flutter/test/scheduler/scheduler_test.dart b/packages/flutter/test/scheduler/scheduler_test.dart index 914c6c0e9b..f76cad5e31 100644 --- a/packages/flutter/test/scheduler/scheduler_test.dart +++ b/packages/flutter/test/scheduler/scheduler_test.dart @@ -2,12 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// TODO(gspencergoog): Remove this tag once this test's state leaks/test -// dependencies have been fixed. -// https://github.com/flutter/flutter/issues/85160 -// Fails with "flutter test --test-randomize-ordering-seed=123" -@Tags(['no-shuffle']) - import 'dart:async'; import 'dart:ui' show window; @@ -140,6 +134,10 @@ void main() { for (final VoidCallback timer in timerQueueTasks) { timer(); } + + // As events are locked, make scheduleTask execute after the test or it + // will execute during following tests and risk failure. + addTearDown(() => scheduler.handleEventLoopCallback()); }); test('Flutter.Frame event fired', () async {