Skip to content
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

Race conditions in unit tests #13

Open
boesing opened this issue Aug 10, 2021 · 3 comments
Open

Race conditions in unit tests #13

boesing opened this issue Aug 10, 2021 · 3 comments
Labels
Bug Something isn't working hacktoberfest-accepted Issues/Pull-Requests which can be fixed during Hacktoberfest: https://hacktoberfest.digitalocean.com Help Wanted

Comments

@boesing
Copy link
Member

boesing commented Aug 10, 2021

Bug Report

Q A
Version(s) any

Summary

It seems that integration tests of this package have impact on each other. The mongo service shared between all tests and thus, calling flush on the ExtMongoDb adapter could cause failing tests.

Current behavior

Integration tests do not have namespaces but even if we would start using these, the adapter does not implement ClearByNamespaceInterface.

How to reproduce

I don't think there is a way to reproduce this. Maybe when executing paratest but I dont have time to dig deeper in it.

Expected behavior

Tests should not have impact on each other.

@boesing boesing added Bug Something isn't working hacktoberfest-accepted Issues/Pull-Requests which can be fixed during Hacktoberfest: https://hacktoberfest.digitalocean.com Help Wanted labels Aug 10, 2021
@rieschl
Copy link

rieschl commented Oct 21, 2021

What if you suffix the collection with some random string?

@boesing
Copy link
Member Author

boesing commented Oct 22, 2021

That could probably work.

@rieschl
Copy link

rieschl commented Oct 22, 2021

That could probably work.

or implement ClearByNamespaceInterface or ClearByPrefixInterface and use that? 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working hacktoberfest-accepted Issues/Pull-Requests which can be fixed during Hacktoberfest: https://hacktoberfest.digitalocean.com Help Wanted
Projects
None yet
Development

No branches or pull requests

2 participants