Changeset - 9d1cd82fb10a
[Not reviewed]
0 1 0
Christopher Esterhuyse - 5 years ago 2020-04-30 10:10:44
christopher.esterhuyse@gmail.com
removed unnecessary test
1 file changed with 0 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/test/mod.rs
Show inline comments
 
use crate::common::ControllerId;
 
use crate::runtime::Connector;
 
use crate::runtime::Unconfigured;
 
use core::fmt::Debug;
 
use std::net::SocketAddr;
 

	
 
mod connector;
 
mod net;
 
mod setup;
 

	
 
// using a static AtomicU16, shared between all tests in the binary,
 
// allocate and return a socketaddr of the form 127.0.0.1:X where X in 7000..
 
fn next_addr() -> SocketAddr {
 
    use std::{
 
        net::{Ipv4Addr, SocketAddrV4},
 
        sync::atomic::{AtomicU16, Ordering::SeqCst},
 
    };
 
    static TEST_PORT: AtomicU16 = AtomicU16::new(7_000);
 
    let port = TEST_PORT.fetch_add(1, SeqCst);
 
    SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 1), port).into()
0 comments (0 inline, 0 general)