-
Notifications
You must be signed in to change notification settings - Fork 35
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
Make Default Log Filter Parallel-Friendly #45
Comments
It's certainly a possibility, but I am not really in favor of such a heavy weight approach. I am pretty sure it will come with all sorts of gotchas (e.g., from the looks of it we'd be in for platform specific logic, meaning that we may exclude some unsupported platforms outright and just generally open whatever can of worms that entails) and suddenly a crate intending to initialize some logging bits influences your test execution behavior in weird ways. My view is that there is a path to making this functionality race-free and with that stable-friendly, and that's with global attribute support. As such, I'd think it would be best if we exert effort on this front. |
I don't like how heavyweight this approach is either, but what what other paths do you see? |
I just noticed that temp-env uses a mutex to block concurrent testing:
Losing parallel tests would be pretty sad for this library, though, since the mutex lock on |
Stable global attributes |
Issue
Make
default_log_filter
stable by implementing a parallel-friendly way to manage environment variables.Proposed Solution
The commit putting the
default_log_filter
attribute behind the "unstable" feature is awesome, but to get things stable, we could look tosealed-test
, which solves the problem by forking unit tests into separate processes.The shortcomings of
sealed-test
are that it doesn't support async and hasn't been updated in a while.The text was updated successfully, but these errors were encountered: