Rename addr <-> url
This commit is contained in:
parent
d3f23b7956
commit
5c562b2ff5
|
@ -27,8 +27,8 @@ const RENDEZVOUS: &'static str = "[::1]:10000";
|
||||||
|
|
||||||
#[tokio::main(flavor = "current_thread")]
|
#[tokio::main(flavor = "current_thread")]
|
||||||
async fn main() -> Result<(), Box<dyn Error>> {
|
async fn main() -> Result<(), Box<dyn Error>> {
|
||||||
let url = RENDEZVOUS.parse()?;
|
let addr = RENDEZVOUS.parse()?;
|
||||||
let incoming = TcpIncoming::new(url, true, None).expect("Cannot bind server socket");
|
let incoming = TcpIncoming::new(addr, true, None).expect("Cannot bind server socket");
|
||||||
run_server(incoming).await?;
|
run_server(incoming).await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
@ -127,8 +127,8 @@ mod test {
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn bidi_streaming() -> Result<(), Box<dyn std::error::Error>> {
|
async fn bidi_streaming() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
let url = RENDEZVOUS.parse()?;
|
let addr = RENDEZVOUS.parse()?;
|
||||||
let incoming = TcpIncoming::new(url, true, None).expect("Cannot bind server socket");
|
let incoming = TcpIncoming::new(addr, true, None).expect("Cannot bind server socket");
|
||||||
tokio::spawn(run_server(incoming));
|
tokio::spawn(run_server(incoming));
|
||||||
|
|
||||||
// This is the number of messages to broadcast
|
// This is the number of messages to broadcast
|
||||||
|
@ -137,8 +137,8 @@ mod test {
|
||||||
const CLIENT_IDS: &[&str] = &["client AAA", "client BBB", "client CCC"];
|
const CLIENT_IDS: &[&str] = &["client AAA", "client BBB", "client CCC"];
|
||||||
|
|
||||||
async fn client(id: &str, mock: &MockMessageChecker) {
|
async fn client(id: &str, mock: &MockMessageChecker) {
|
||||||
let addr = format!("http://{}", RENDEZVOUS);
|
let url = format!("http://{}", RENDEZVOUS);
|
||||||
let mut client = ServiceClient::connect(addr).await.unwrap();
|
let mut client = ServiceClient::connect(url).await.unwrap();
|
||||||
|
|
||||||
let client_id = String::from(id);
|
let client_id = String::from(id);
|
||||||
let outbound = async_stream::stream! {
|
let outbound = async_stream::stream! {
|
||||||
|
|
Loading…
Reference in New Issue