We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34ed89d commit c004653Copy full SHA for c004653
src/common/buf.rs
@@ -62,5 +62,15 @@ impl<B: Buf> Buf for AlertOnEos<B> {
62
63
#[cfg(test)]
64
mod tests {
65
+ use crate::common::buf::AlertOnEos;
66
+ use hyper::body::Bytes;
67
+ use std::time::Duration;
68
-}
69
+ #[tokio::test]
70
+ async fn test_get_notified() {
71
+ let buf = Bytes::from_static(b"");
72
+ let (_buf, signaler) = AlertOnEos::new(buf);
73
+ let result = tokio::time::timeout(Duration::from_secs(1), signaler.wait_till_eos()).await;
74
+ assert_eq!(result, Ok(()));
75
+ }
76
+}
0 commit comments