Unverified Commit 83b9e99c authored by Alexander Dahlberg's avatar Alexander Dahlberg Committed by GitHub

Fixed leak and removed no-shuffle tag in scheduler_test.dart (#88423)

Co-authored-by: 's avatarAlexander Dahlberg <alexander.dahlberg@sigma.se>

This PR fixed the problem that has prevented scheduler_test.dart being shuffled. Part of #85160.

One test schedules a task, but events are locked so the scheduled task does not execute and this messes up other tests.
This PR adds a teardown that executes the scheduled task after the test, when events are unlocked.
parent 2ee02344
......@@ -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(<String>['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 {
......
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