Skip to content

Flake in image_filter_test due to non-synchronous test addtion #151973

@zanderso

Description

@zanderso

The test here

https://github.com/flutter/engine/blame/main/testing/dart/image_filter_test.dart#L356

Added after the await here

https://github.com/flutter/engine/blame/main/testing/dart/image_filter_test.dart#L305

Can race with the start of tests running, leading to failures like:

https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20Production%20Engine%20Drone/824847/overview

[ERROR:flutter/shell/testing/tester_main.cc(671)] Unhandled exception
Exception: Bad state: Test "Scaling a checkerboard of 1x1 red-green pixels with FilterQuality.none" added after tests have started to run. Calls to test() must be synchronous with main().
Stack trace: #0      TestSuite.test (package:litetest/src/test_suite.dart:37:7)
#1      test (package:litetest/litetest.dart:25:14)
#2      main.<anonymous closure> (file:///b/s/w/ir/cache/builder/src/flutter/testing/dart/image_filter_test.dart:356:5)
<asynchronous suspension>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions