mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fixed leak and removed no-shuffle tag in platform_channel_test.dart (#88432)
Co-authored-by: Alexander Dahlberg <alexander.dahlberg@sigma.se> This PR fixed the problem that prevented platform_channel_test.dart being shuffled. Part of #85160. A couple of tests sets up callbacks through setMethodCallHandler() that gets unresolved and breaks other tests. This PR clears those callbacks by passing null to setMethodCallHandler.
This commit is contained in:
parent
86d7ec4548
commit
02bb8a4355
@ -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=456"
|
||||
@Tags(<String>['no-shuffle'])
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
@ -232,6 +226,7 @@ void main() {
|
||||
.having((PlatformException e) => e.message, 'message', equals('sayHello failed')),
|
||||
),
|
||||
);
|
||||
channel.setMethodCallHandler(null);
|
||||
});
|
||||
|
||||
test('can handle method call with other error result', () async {
|
||||
@ -251,6 +246,7 @@ void main() {
|
||||
.having((PlatformException e) => e.message, 'message', equals('Invalid argument(s): bad')),
|
||||
),
|
||||
);
|
||||
channel.setMethodCallHandler(null);
|
||||
});
|
||||
|
||||
test('can check the mock handler', () async {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user