1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 01:51:23 +02:00

Optionally support tokio-uds's UnixStream as IoStream (#472)

This commit is contained in:
Kornel
2018-08-17 17:04:16 +01:00
committed by Douman
parent 8fe30a5b66
commit bdc9a8bb07
6 changed files with 44 additions and 0 deletions

View File

@ -5,6 +5,8 @@ extern crate bytes;
extern crate flate2;
extern crate futures;
extern crate rand;
#[cfg(all(unix, feature = "uds"))]
extern crate tokio_uds;
use std::io::Read;
@ -198,6 +200,14 @@ fn test_client_gzip_encoding_large_random() {
assert_eq!(bytes, Bytes::from(data));
}
#[cfg(all(unix, feature = "uds"))]
#[test]
fn test_compatible_with_unix_socket_stream() {
let (stream, _) = tokio_uds::UnixStream::pair().unwrap();
let _ = client::Connection::from_stream(stream);
}
#[cfg(feature = "brotli")]
#[test]
fn test_client_brotli_encoding() {