Skip to content

Commit a28aae9

Browse files
authored
Remove no-shuffle from framework tests, part 1: easy cases (#123751)
Remove no-shuffle from framework tests, part 1: easy cases
1 parent 5f71179 commit a28aae9

File tree

7 files changed

+12
-50
lines changed

7 files changed

+12
-50
lines changed

packages/flutter/test/cupertino/action_sheet_test.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// TODO(gspencergoog): Remove this tag once this test's state leaks/test
6-
// dependencies have been fixed.
7-
// https://github.com/flutter/flutter/issues/85160
8-
// Fails with "flutter test --test-randomize-ordering-seed=123"
9-
@Tags(<String>['no-shuffle'])
10-
library;
11-
125
import 'package:flutter/cupertino.dart';
136
import 'package:flutter/foundation.dart';
147
import 'package:flutter/gestures.dart';

packages/flutter/test/cupertino/date_picker_test.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// no-shuffle:
6-
// //TODO(gspencergoog): Remove this tag once this test's state leaks/test
7-
// dependencies have been fixed.
8-
// https://github.com/flutter/flutter/issues/85160
9-
// Fails with "flutter test --test-randomize-ordering-seed=456"
105
// reduced-test-set:
116
// This file is run as part of a reduced test set in CI on Mac and Windows
127
// machines.
13-
@Tags(<String>['reduced-test-set', 'no-shuffle'])
8+
@Tags(<String>['reduced-test-set'])
149
library;
1510

1611
import 'dart:ui';

packages/flutter/test/cupertino/nav_bar_transition_test.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// TODO(gspencergoog): Remove this tag once this test's state leaks/test
6-
// dependencies have been fixed.
7-
// https://github.com/flutter/flutter/issues/85160
8-
// Fails with "flutter test --test-randomize-ordering-seed=456"
9-
@Tags(<String>['no-shuffle'])
105
@TestOn('!chrome')
116
library;
127

packages/flutter/test/foundation/service_extensions_test.dart

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// TODO(gspencergoog): Remove this tag once this test's state leaks/test
6-
// dependencies have been fixed.
7-
// https://github.com/flutter/flutter/issues/85160
8-
// Fails with "flutter test --test-randomize-ordering-seed=123"
9-
@Tags(<String>['no-shuffle'])
10-
library;
11-
125
import 'dart:async';
136
import 'dart:convert';
147
import 'dart:ui' as ui;
@@ -870,6 +863,7 @@ void main() {
870863
result = await pendingResult;
871864
expect(result, <String, String>{});
872865
expect(binding.reassembled, 1);
866+
binding.reassembled = 0;
873867
});
874868

875869
test('Service extensions - showPerformanceOverlay', () async {

packages/flutter/test/physics/newton_test.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// TODO(gspencergoog): Remove this tag once this test's state leaks/test
6-
// dependencies have been fixed.
7-
// https://github.com/flutter/flutter/issues/85160
8-
// Fails with "flutter test --test-randomize-ordering-seed=123"
9-
@Tags(<String>['no-shuffle'])
10-
library;
11-
125
import 'package:flutter/foundation.dart';
136
import 'package:flutter/physics.dart';
147
import 'package:flutter/widgets.dart';

packages/flutter/test/services/platform_channel_test.dart

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// TODO(gspencergoog): Remove this tag once this test's state leaks/test
6-
// dependencies have been fixed.
7-
// https://github.com/flutter/flutter/issues/85160
8-
// Fails with "flutter test --test-randomize-ordering-seed=20210826"
9-
@Tags(<String>['no-shuffle'])
10-
library;
11-
125
import 'package:flutter/services.dart';
136
import 'package:flutter_test/flutter_test.dart';
147

@@ -44,8 +37,14 @@ void main() {
4437
group('MethodChannel', () {
4538
const MessageCodec<dynamic> jsonMessage = JSONMessageCodec();
4639
const MethodCodec jsonMethod = JSONMethodCodec();
40+
4741
const MethodChannel channel = MethodChannel('ch7', jsonMethod);
4842
const OptionalMethodChannel optionalMethodChannel = OptionalMethodChannel('ch8', jsonMethod);
43+
tearDown(() {
44+
channel.setMethodCallHandler(null);
45+
optionalMethodChannel.setMethodCallHandler(null);
46+
});
47+
4948
test('can invoke method and get result', () async {
5049
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockMessageHandler(
5150
'ch7',
@@ -233,7 +232,6 @@ void main() {
233232
.having((PlatformException e) => e.message, 'message', equals('sayHello failed')),
234233
),
235234
);
236-
channel.setMethodCallHandler(null);
237235
});
238236

239237
test('can handle method call with other error result', () async {
@@ -253,7 +251,6 @@ void main() {
253251
.having((PlatformException e) => e.message, 'message', equals('Invalid argument(s): bad')),
254252
),
255253
);
256-
channel.setMethodCallHandler(null);
257254
});
258255

259256
test('can check the mock handler', () async {

packages/flutter/test/widgets/widget_inspector_test.dart

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// no-shuffle:
6-
// //TODO(gspencergoog): Remove this tag once this test's state leaks/test
7-
// dependencies have been fixed.
8-
// https://github.com/flutter/flutter/issues/85160
9-
// Fails with "flutter test --test-randomize-ordering-seed=456"
105
// reduced-test-set:
116
// This file is run as part of a reduced test set in CI on Mac and Windows
127
// machines.
@@ -3750,7 +3745,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
37503745
_CreationLocation location = knownLocations[id]!;
37513746
expect(location.file, equals(file));
37523747
// ClockText widget.
3753-
expect(location.line, equals(60));
3748+
expect(location.line, equals(55));
37543749
expect(location.column, equals(9));
37553750
expect(location.name, equals('ClockText'));
37563751
expect(count, equals(1));
@@ -3760,7 +3755,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
37603755
location = knownLocations[id]!;
37613756
expect(location.file, equals(file));
37623757
// Text widget in _ClockTextState build method.
3763-
expect(location.line, equals(98));
3758+
expect(location.line, equals(93));
37643759
expect(location.column, equals(12));
37653760
expect(location.name, equals('Text'));
37663761
expect(count, equals(1));
@@ -3787,7 +3782,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
37873782
location = knownLocations[id]!;
37883783
expect(location.file, equals(file));
37893784
// ClockText widget.
3790-
expect(location.line, equals(60));
3785+
expect(location.line, equals(55));
37913786
expect(location.column, equals(9));
37923787
expect(location.name, equals('ClockText'));
37933788
expect(count, equals(3)); // 3 clock widget instances rebuilt.
@@ -3797,7 +3792,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
37973792
location = knownLocations[id]!;
37983793
expect(location.file, equals(file));
37993794
// Text widget in _ClockTextState build method.
3800-
expect(location.line, equals(98));
3795+
expect(location.line, equals(93));
38013796
expect(location.column, equals(12));
38023797
expect(location.name, equals('Text'));
38033798
expect(count, equals(3)); // 3 clock widget instances rebuilt.

0 commit comments

Comments
 (0)