log: Use serial_test to avoid conflicts with other tests

This commit is contained in:
Nick Steel 2024-04-27 23:47:12 +01:00
parent 490c774718
commit b8e8f4b7a3
2 changed files with 4 additions and 0 deletions

View file

@ -40,6 +40,7 @@ ron = "0.8"
serde_json = "1.0"
futures-executor = "0.3.1"
gir-format-check = "0.1"
serial_test = "3"
[features]
default = []

View file

@ -1298,6 +1298,7 @@ pub fn remove_log_function(log_fn: DebugLogFunction) {
#[cfg(test)]
mod tests {
use serial_test::serial;
use std::sync::{mpsc, Arc, Mutex};
use super::*;
@ -1371,6 +1372,7 @@ mod tests {
});
#[test]
#[serial]
#[cfg(feature = "log")]
fn log_trait() {
crate::init().unwrap();
@ -1421,6 +1423,7 @@ mod tests {
}
#[test]
#[serial]
fn log_handler() {
crate::init().unwrap();