mirror of https://github.com/fafhrd91/actix-web
proper fix for awc test
This commit is contained in:
parent
5f22efffc4
commit
0bdbec6f25
|
@ -722,11 +722,9 @@ async fn test_client_cookie_handling() {
|
|||
async fn client_unread_response() {
|
||||
let addr = test::unused_addr();
|
||||
|
||||
let (tx, rx) = std::sync::mpsc::sync_channel(1);
|
||||
let lst = std::net::TcpListener::bind(addr).unwrap();
|
||||
|
||||
std::thread::spawn(move || {
|
||||
let lst = std::net::TcpListener::bind(addr).unwrap();
|
||||
tx.send(()).unwrap();
|
||||
for stream in lst.incoming() {
|
||||
let mut stream = stream.unwrap();
|
||||
let mut b = [0; 1000];
|
||||
|
@ -740,8 +738,6 @@ async fn client_unread_response() {
|
|||
}
|
||||
});
|
||||
|
||||
rx.recv().unwrap();
|
||||
|
||||
// client request
|
||||
let req = awc::Client::new().get(format!("http://{}/", addr).as_str());
|
||||
let mut res = req.send().await.unwrap();
|
||||
|
|
Loading…
Reference in New Issue