Closed
Description
Bevy version
0.5
Operating system & version
Ubuntu 18.04
What you did
I am trying to write tests for systems and encounter this error when there are multiple tests
#[cfg(test)]
mod test_example {
use super::*;
fn setup() -> App {
let mut builder = App::build();
builder.add_plugins(DefaultPlugins);
builder.app
}
#[test]
fn test_one() {
let _app = setup();
assert!(true);
}
#[test]
fn test_two() {
let _app = setup();
assert!(true);
}
}
What you expected to happen
Log instances shouldn't conflict
What actually happened
Could not set global default tracing subscriber. If you've already set up a tracing subscriber, please disable LogPlugin from Bevy's DefaultPlugins
Additional information
A possible fix might be to remove the explicit panics if creating a global subscriber fails
bevy/crates/bevy_log/src/lib.rs
Line 79 in 4a477e7