Skip to content

Fix locks used in MockConsumer [13303] #2364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 21, 2022
Merged

Conversation

MiguelCompany
Copy link
Member

The class used on unit tests for checking behavior regarding the log messages is wrongly used.
A reference to its condition_variable is obtained and then used with a different mutex.

This PR fixes this by adding a generic wait method receiving a predicate, as long as a wait_for_at_least_entries method, which is the most common use in the unit tests.

The cv() getter and ConsumedEntriesSize_nts() methods are removed, to ensure we don't have incorrect behaviour.

@EduPonz EduPonz added this to the v2.5.1 milestone Dec 20, 2021
@MiguelCompany MiguelCompany merged commit e9eb1db into master Jan 21, 2022
@MiguelCompany MiguelCompany deleted the hotfix/log-consumer-mock branch January 21, 2022 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants