Skip to content

Commit

Permalink
fix typo, adding file removal step at end of unix domain socket tests
Browse files Browse the repository at this point in the history
Signed-off-by: gabrik <[email protected]>
  • Loading branch information
gabrik committed Nov 23, 2020
1 parent 6e8d9cd commit f8acca3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
18 changes: 11 additions & 7 deletions zenoh-protocol/tests/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ async fn run(
fn channel_tcp() {
// Define the locators
let locators: Vec<Locator> = vec!["tcp/127.0.0.1:7447".parse().unwrap()];
// Define the reliability and congestgino control
// Define the reliability and congestion control
let reliability = [Reliability::Reliable, Reliability::BestEffort];
let congestion_control = [CongestionControl::Block, CongestionControl::Drop];
// Run
Expand All @@ -290,7 +290,7 @@ fn channel_tcp() {
fn channel_udp() {
// Define the locator
let locators: Vec<Locator> = vec!["udp/127.0.0.1:7447".parse().unwrap()];
// Define the reliability and congestgino control
// Define the reliability and congestion control
let reliability = [Reliability::BestEffort];
let congestion_control = [CongestionControl::Block, CongestionControl::Drop];
// Run
Expand All @@ -313,7 +313,7 @@ fn channel_unix() {
let locators: Vec<Locator> = vec!["unixsock-stream/zenoh-test-unix-socket-5.sock"
.parse()
.unwrap()];
// Define the reliability and congestgino control
// Define the reliability and congestion control
let reliability = [Reliability::BestEffort];
let congestion_control = [CongestionControl::Block, CongestionControl::Drop];
// Run
Expand All @@ -326,6 +326,7 @@ fn channel_unix() {
}
close_session(router_manager, client_session, locators).await;
});
let _ = std::fs::remove_file("zenoh-test-unix-socket-5.sock");
}

#[test]
Expand All @@ -335,7 +336,7 @@ fn channel_tcp_udp() {
"tcp/127.0.0.1:7448".parse().unwrap(),
"udp/127.0.0.1:7448".parse().unwrap(),
];
// Define the reliability and congestgino control
// Define the reliability and congestion control
let reliability = [Reliability::BestEffort];
let congestion_control = [CongestionControl::Block, CongestionControl::Drop];
// Run
Expand All @@ -361,7 +362,7 @@ fn channel_tcp_unix() {
.parse()
.unwrap(),
];
// Define the reliability and congestgino control
// Define the reliability and congestion control
let reliability = [Reliability::BestEffort];
let congestion_control = [CongestionControl::Block, CongestionControl::Drop];
// Run
Expand All @@ -374,6 +375,7 @@ fn channel_tcp_unix() {
}
close_session(router_manager, client_session, locators).await;
});
let _ = std::fs::remove_file("zenoh-test-unix-socket-6.sock");
}

#[cfg(all(feature = "transport_unixsock-stream", target_family = "unix"))]
Expand All @@ -387,7 +389,7 @@ fn channel_udp_unix() {
.parse()
.unwrap(),
];
// Define the reliability and congestgino control
// Define the reliability and congestion control
let reliability = [Reliability::BestEffort];
let congestion_control = [CongestionControl::Block, CongestionControl::Drop];
// Run
Expand All @@ -400,6 +402,7 @@ fn channel_udp_unix() {
}
close_session(router_manager, client_session, locators).await;
});
let _ = std::fs::remove_file("zenoh-test-unix-socket-7.sock");
}

#[cfg(all(feature = "transport_unixsock-stream", target_family = "unix"))]
Expand All @@ -414,7 +417,7 @@ fn channel_tcp_udp_unix() {
.parse()
.unwrap(),
];
// Define the reliability and congestgino control
// Define the reliability and congestion control
let reliability = [Reliability::BestEffort];
let congestion_control = [CongestionControl::Block, CongestionControl::Drop];
// Run
Expand All @@ -427,4 +430,5 @@ fn channel_tcp_udp_unix() {
}
close_session(router_manager, client_session, locators).await;
});
let _ = std::fs::remove_file("zenoh-test-unix-socket-8.sock");
}
5 changes: 5 additions & 0 deletions zenoh-protocol/tests/locators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ fn locator_unix() {
.unwrap(),
];
task::block_on(run(locators));
let _ = std::fs::remove_file("zenoh-test-unix-socket-0.sock");
let _ = std::fs::remove_file("zenoh-test-unix-socket-1.sock");
}

#[test]
Expand All @@ -161,6 +163,7 @@ fn locator_tcp_udp_unix() {
.unwrap(),
];
task::block_on(run(locators));
let _ = std::fs::remove_file("zenoh-test-unix-socket-2.sock");
}

#[cfg(all(feature = "transport_unixsock-stream", target_family = "unix"))]
Expand All @@ -176,6 +179,7 @@ fn locator_tcp_unix() {
.unwrap(),
];
task::block_on(run(locators));
let _ = std::fs::remove_file("zenoh-test-unix-socket-3.sock");
}

#[cfg(all(feature = "transport_unixsock-stream", target_family = "unix"))]
Expand All @@ -191,4 +195,5 @@ fn locator_udp_unix() {
.unwrap(),
];
task::block_on(run(locators));
let _ = std::fs::remove_file("zenoh-test-unix-socket-4.sock");
}
1 change: 1 addition & 0 deletions zenoh-protocol/tests/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -735,4 +735,5 @@ fn session_unix() {
session_open_close(locator.clone()).await;
session_lease(locator).await;
});
let _ = std::fs::remove_file("zenoh-test-unix-socket-9.sock");
}

0 comments on commit f8acca3

Please sign in to comment.