Merge branch 'fix/fix/logging-test-global-subscriber'
This commit is contained in:
commit
634ceb365a
1 file changed
+7
-2
+7
-2
@@ -105,8 +105,13 @@ mod tests {
|
|||||||
log_file_path: Some(log_path.to_string_lossy().to_string()),
|
log_file_path: Some(log_path.to_string_lossy().to_string()),
|
||||||
};
|
};
|
||||||
|
|
||||||
let result = init(&config);
|
if let Err(e) = init(&config) {
|
||||||
assert!(result.is_ok(), "init failed: {:?}", result.err());
|
let msg = format!("{e}");
|
||||||
|
assert!(
|
||||||
|
msg.contains("global default trace dispatcher") || msg.contains("already been set"),
|
||||||
|
"unexpected init error: {e}"
|
||||||
|
);
|
||||||
|
}
|
||||||
assert!(log_path.exists(), "log file should be created");
|
assert!(log_path.exists(), "log file should be created");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user