From 2ee02344716dece923c82670325e25711b1c7f9f Mon Sep 17 00:00:00 2001 From: Alexander Dahlberg Date: Mon, 23 Aug 2021 19:03:03 +0200 Subject: [PATCH] Fixed leak and removed no-shuffle tag in image_stream_test.dart (#88376) Fixes test/painting/image_stream_test.dart of #85160 The problem: The timeDilation was changed to 2.0 but not restored. The changed timeDilation carried on to following tests which messed up some of them when using test ordering seed 456. The Fix: Restore timeDilation to 1.0 at the end of test. --- packages/flutter/test/painting/image_stream_test.dart | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/flutter/test/painting/image_stream_test.dart b/packages/flutter/test/painting/image_stream_test.dart index 264e81ea48..59dd444923 100644 --- a/packages/flutter/test/painting/image_stream_test.dart +++ b/packages/flutter/test/painting/image_stream_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=456" -@Tags(['no-shuffle']) - import 'dart:async'; import 'dart:typed_data'; import 'dart:ui'; @@ -620,6 +614,7 @@ void main() { expect(mockCodec.numFramesAsked, 2); await tester.pump(const Duration(milliseconds: 200)); // emit 2nd frame. expect(mockCodec.numFramesAsked, 3); + timeDilation = 1.0; // restore time dilation, or it will affect other tests }); testWidgets('error handlers can intercept errors', (WidgetTester tester) async {