Skip to content

Conversation

@ajpallares
Copy link
Member

The test EventsManagerIntegrationTests.testPostingCustomerCenterDoesNotFail() was sometimes failing. E.g. here (even though it passed after 3 retries).

This PR makes the test more deterministic by waiting for the execution of Purchases.shared.track(customerCenterEvent: ) to complete before checking the logs.
In addition, the logs check is also more strict now, checking for the right event name + event identifier.

More details

I suspect the reason of the random failures is that Task.yield() would not always wait for the track event Tasks to complete, resulting in the test checks happening before the expected logs actually happened.

@ajpallares
Copy link
Member Author

@RCGitBot please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants