Skip to content

Commit

Permalink
add num_addresses variable
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderwiederin committed Nov 14, 2023
1 parent 1e06b79 commit 7d52e50
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/test/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,10 @@ pub fn random_port() -> u16 {
}

pub fn random_listening_addresses() -> Vec<SocketAddress> {
let mut listening_addresses = Vec::with_capacity(2);
let num_addresses = 2;
let mut listening_addresses = Vec::with_capacity(num_addresses);

for _ in 0..2 {
for _ in 0..num_addresses {
let rand_port = random_port();
let address: SocketAddress = format!("127.0.0.1:{}", rand_port).parse().unwrap();
listening_addresses.push(address);
Expand Down

0 comments on commit 7d52e50

Please sign in to comment.