test(server): try to fix windows keep-alive test

This commit is contained in:
Sean McArthur
2017-12-13 16:47:07 -08:00
parent fe82cea96a
commit be7ca0415d

View File

@@ -623,7 +623,9 @@ fn disable_keep_alive_post_request() {
tx1.send(()).unwrap(); tx1.send(()).unwrap();
let nread = req.read(&mut buf).unwrap(); // allow a little more time for TCP to notice the FIN
req.set_read_timeout(Some(Duration::from_secs(5))).expect("set_read_timeout 2");
let nread = req.read(&mut buf).expect("keep-alive reading");
assert_eq!(nread, 0); assert_eq!(nread, 0);
}); });
@@ -631,7 +633,7 @@ fn disable_keep_alive_post_request() {
.into_future() .into_future()
.map_err(|_| unreachable!()) .map_err(|_| unreachable!())
.and_then(|(item, _incoming)| { .and_then(|(item, _incoming)| {
let (socket, _) = item.unwrap(); let (socket, _) = item.expect("accepted socket");
Http::<hyper::Chunk>::new().serve_connection(socket, HelloWorld) Http::<hyper::Chunk>::new().serve_connection(socket, HelloWorld)
.select2(rx1) .select2(rx1)
.then(|r| { .then(|r| {