From 1068d313829a33f34a79b488f0d1f949acefdd19 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Tue, 29 Oct 2024 12:01:54 -0700 Subject: [PATCH] Fix and remove a few `no-shuffle` tags in `flutter_tools`. (#157656) Two of the tests, `test_test` and `break_on_framework_exceptions`, no longer appear to leak (without changes). Perhaps underlying infrastructure has changed, or some other bug in the tool itself was fixed in meantime. `packages_test` required resetting `Cache.flutterRoot`. Work towards https://github.com/flutter/flutter/issues/85160. --- .../commands.shard/permeable/packages_test.dart | 15 +++++++-------- .../break_on_framework_exceptions_test.dart | 7 ------- .../test/integration.shard/test_test.dart | 7 ------- 3 files changed, 7 insertions(+), 22 deletions(-) diff --git a/packages/flutter_tools/test/commands.shard/permeable/packages_test.dart b/packages/flutter_tools/test/commands.shard/permeable/packages_test.dart index 5a91cc445d..1a788aae5d 100644 --- a/packages/flutter_tools/test/commands.shard/permeable/packages_test.dart +++ b/packages/flutter_tools/test/commands.shard/permeable/packages_test.dart @@ -2,13 +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=1000" -@Tags(['no-shuffle']) -library; - import 'dart:async'; import 'dart:convert'; @@ -38,9 +31,15 @@ void main() { setUp(() { mockStdio = FakeStdio()..stdout.terminalColumns = 80; + + // Some tests below override this with a blank root, always reset it. + Cache.flutterRoot = null; + }); + + setUpAll(() { + Cache.disableLocking(); }); - Cache.disableLocking(); group('packages get/upgrade', () { late Directory tempDir; late FakeAnalytics fakeAnalytics; diff --git a/packages/flutter_tools/test/integration.shard/break_on_framework_exceptions_test.dart b/packages/flutter_tools/test/integration.shard/break_on_framework_exceptions_test.dart index 94672c2818..8599d6230f 100644 --- a/packages/flutter_tools/test/integration.shard/break_on_framework_exceptions_test.dart +++ b/packages/flutter_tools/test/integration.shard/break_on_framework_exceptions_test.dart @@ -2,13 +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=1000" -@Tags(['no-shuffle']) -library; - import 'dart:async'; import 'package:file/file.dart'; diff --git a/packages/flutter_tools/test/integration.shard/test_test.dart b/packages/flutter_tools/test/integration.shard/test_test.dart index 4b0533564a..b84248f83e 100644 --- a/packages/flutter_tools/test/integration.shard/test_test.dart +++ b/packages/flutter_tools/test/integration.shard/test_test.dart @@ -2,13 +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=1000" -@Tags(['no-shuffle']) -library; - import 'dart:async'; import 'dart:convert';