Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

avoid race condition when calling getMapAsync from OnMapReadyIdlingResource - #12308

Merged
tobrun merged 1 commit into
masterfrom
tvn-flaky-tests
Jul 5, 2018
Merged

tobrun merged 1 commit into
masterfrom
tvn-flaky-tests

Conversation

@tobrun

@tobrun tobrun commented Jul 4, 2018

Copy link
Copy Markdown
Member

Closes #10998 , this PR moves the invocation in of getMapAsync in OnMapReadyIdlingResource to the main thread. Our tests where suffering from an occasional race condition (1 out 7000 executions) where the style could have been loaded but due to thread switching this was missed when calling getMapSync from the other thread. Will need to do some additional tests run to confirm but I'm hoping proposed code will fix the root cause.

cc @mapbox/android as this file has been used in different projects

@tobrun tobrun added Android Mapbox Maps SDK for Android tests labels Jul 4, 2018
@tobrun tobrun added this to the android-v6.3.0 milestone Jul 4, 2018
@tobrun tobrun self-assigned this Jul 4, 2018
@tobrun
tobrun requested a review from LukasPaczos July 4, 2018 15:11

@LukasPaczos LukasPaczos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

@tobrun
tobrun merged commit 9920b25 into master Jul 5, 2018
@tobrun
tobrun deleted the tvn-flaky-tests branch July 5, 2018 09:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Android Mapbox Maps SDK for Android tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky instrumented tests

2 participants