Add code to create a client connected to the network
Some checks failed
Build library & run tests / build (push) Failing after 22s
Some checks failed
Build library & run tests / build (push) Failing after 22s
This commit is contained in:
@@ -30,7 +30,7 @@ enum TestProtocol {
|
||||
async fn main() {
|
||||
let (qtx, qrx) = mpsc::channel(16);
|
||||
let (atx, arx) = mpsc::channel(16);
|
||||
let client = TestProtocolClient::new(qtx, arx);
|
||||
let client = TestProtocolClient::new(qtx, arx, None);
|
||||
let server = tokio::spawn(server_loop(qrx, atx));
|
||||
let result = client.addition(2, 5).await.unwrap();
|
||||
assert_eq!(result, 7);
|
||||
@@ -91,7 +91,7 @@ async fn server_loop(
|
||||
async fn heavy_async() {
|
||||
let (qtx, qrx) = mpsc::channel(16);
|
||||
let (atx, arx) = mpsc::channel(16);
|
||||
let client = TestProtocolClient::new(qtx, arx);
|
||||
let client = TestProtocolClient::new(qtx, arx, None);
|
||||
let server = tokio::spawn(server_loop(qrx, atx));
|
||||
let mut tasks = Vec::new();
|
||||
for i in 0..100 {
|
||||
|
||||
Reference in New Issue
Block a user