mirror of
https://github.com/actix/actix-web.git
synced 2024-12-17 05:36:36 +00:00
Check WS stream completed after close.
This commit is contained in:
parent
d3911ec285
commit
a5f8534573
1 changed files with 4 additions and 0 deletions
|
@ -52,6 +52,10 @@ async fn common_test_code(mut srv: actix_test::TestServer, frame_size: usize) {
|
|||
.unwrap();
|
||||
let item = framed.next().await.unwrap().unwrap();
|
||||
assert_eq!(item, ws::Frame::Close(Some(ws::CloseCode::Normal.into())));
|
||||
|
||||
let nothing = actix_rt::time::timeout(std::time::Duration::from_secs(1), framed.next()).await;
|
||||
assert_eq!(true, nothing.is_ok());
|
||||
assert_eq!(true, nothing.unwrap().is_none());
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
|
|
Loading…
Reference in a new issue