Skip to content

Platform view scenario test race has condition when creating the view #126627

@cyanglaz

Description

@cyanglaz

The scenario app uses a map to indicate if a PlatformView id is in using (https://github.com/flutter/engine/blob/1833429a63ab1a40fc1040d0386ae71891a77473/testing/scenario_app/lib/src/platform_view.dart#L1780).

The map, however, is populated asynchronously during the "create" Platform channel call: https://github.com/flutter/engine/blob/1833429a63ab1a40fc1040d0386ae71891a77473/testing/scenario_app/lib/src/platform_view.dart#L1857-L1883

So a new addPlatformView is invoked before the first one completes, it will override the previous PlatformView. This cause a race condition and potential flaky test.

The Flutter framework prevents this situation from happening but the engine should still be resilient of this situation. A separate issue is created to track the engine fix: #125913

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listengineflutter/engine related. See also e: labels.platform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions