Skip to content

Commit 8e77e01

Browse files
committed
unit-tests issues fixing
1 parent db7106b commit 8e77e01

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/args.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub struct Args {
4343

4444
/// run in client mode; value is the server's address
4545
#[arg(short, long, value_name = "host", conflicts_with = "server")]
46-
pub client: Option<std::net::IpAddr>,
46+
pub client: Option<String>,
4747

4848
/// run in reverse-mode (server sends, client receives)
4949
#[arg(short = 'R', long, conflicts_with = "server")]
@@ -109,7 +109,7 @@ pub struct Args {
109109
/// primarily to avoid including TCP ramp-up in averages;
110110
/// using this option may result in disagreement between bytes sent and received,
111111
/// since data can be in-flight across time-boundaries
112-
#[arg(short, long, default_value = "0", value_name = "seconds", conflicts_with = "server")]
112+
#[arg(short = 'o', long, default_value = "0", value_name = "seconds", conflicts_with = "server")]
113113
pub omit: usize,
114114

115115
/// use no-delay mode for TCP tests, disabling Nagle's Algorithm

src/client.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pub fn execute(args: &args::Args) -> BoxResult<()> {
129129
let mut download_config = prepare_download_configuration(args, test_id.as_bytes())?;
130130

131131
//connect to the server
132-
let mut stream = connect_to_server(&args.client.unwrap().to_string(), &args.port)?;
132+
let mut stream = connect_to_server(args.client.as_ref().unwrap(), &args.port)?;
133133
let server_addr = stream.peer_addr()?;
134134

135135
//scaffolding to track and relay the streams and stream-results associated with this test

0 commit comments

Comments
 (0)