Просмотр исходного кода

Fix the log name conflict in persist_tests.rs.

Jing Yang 3 лет назад
Родитель
Сommit
721185df85
1 измененных файлов с 7 добавлено и 4 удалено
  1. 7 4
      tests/persist_tests.rs

+ 7 - 4
tests/persist_tests.rs

@@ -301,9 +301,12 @@ fn figure8_unreliable() -> config::Result<()> {
     Ok(())
     Ok(())
 }
 }
 
 
-fn internal_churn(unreliable: bool) -> config::Result<()> {
+fn internal_churn(
+    unreliable: bool,
+    test_name: &'static str,
+) -> config::Result<()> {
     const SERVERS: usize = 5;
     const SERVERS: usize = 5;
-    let cfg = Arc::new(make_config!(SERVERS, false));
+    let cfg = Arc::new(config::make_config(SERVERS, false, test_name));
     defer!(cfg.cleanup());
     defer!(cfg.cleanup());
 
 
     if unreliable {
     if unreliable {
@@ -422,10 +425,10 @@ fn internal_churn(unreliable: bool) -> config::Result<()> {
 
 
 #[test]
 #[test]
 fn reliable_churn() -> config::Result<()> {
 fn reliable_churn() -> config::Result<()> {
-    internal_churn(false)
+    internal_churn(false, stdext::function_name!())
 }
 }
 
 
 #[test]
 #[test]
 fn unreliable_churn() -> config::Result<()> {
 fn unreliable_churn() -> config::Result<()> {
-    internal_churn(true)
+    internal_churn(true, stdext::function_name!())
 }
 }