I am trying to connect multiple test clients to one server / filter. I tried:
#[tokio::test]
async fn test_ws() {
let mut client1 = warp::test::ws()
.path("/api/ws/test")
.handshake(get_server())
.await
.expect("handshake");
let mut client2 = warp::test::ws()
.path("/api/ws/test")
.handshake(get_server())
.await
.expect("handshake");
The get_server
functions returns a BoxedFilter
that i want to test. I tried storing it and borrowing it but that didn’t work. This currently creates a new test server for each client. I want the clients to connect to the same test server.