fixup tests
This commit is contained in:
		| @@ -133,7 +133,21 @@ impl<T, P, B> Stream for Connection<T, P, B> | ||||
|         } | ||||
|  | ||||
|         loop { | ||||
|             let frame = try_ready!(self.inner.poll()); | ||||
|             let frame = match try!(self.inner.poll()) { | ||||
|                 Async::Ready(f) => f, | ||||
|  | ||||
|                 // XXX is this necessary? | ||||
|                 Async::NotReady => { | ||||
|                     // Receiving new frames may depend on ensuring that the write buffer | ||||
|                     // is clear (e.g. if window updates need to be sent), so `poll_complete` | ||||
|                     // is called here.  | ||||
|                     try_ready!(self.poll_complete()); | ||||
|  | ||||
|                     // If the write buffer is cleared, attempt to poll the underlying | ||||
|                     // stream once more because it, may have been made ready. | ||||
|                     try_ready!(self.inner.poll()) | ||||
|                 } | ||||
|             }; | ||||
|  | ||||
|             trace!("poll; frame={:?}", frame); | ||||
|             let frame = match frame { | ||||
|   | ||||
| @@ -146,7 +146,7 @@ impl StreamState { | ||||
|                 }; | ||||
|             } | ||||
|  | ||||
|             HalfClosedLocal(AwaitingHeaders) => { | ||||
|             HalfClosedRemote(AwaitingHeaders) => { | ||||
|                 *self = HalfClosedRemote(PeerState::streaming(sz)); | ||||
|             } | ||||
|  | ||||
|   | ||||
| @@ -55,7 +55,7 @@ mod client_request { | ||||
|         trace!("hands have been shook"); | ||||
|  | ||||
|         // At this point, the connection should be closed | ||||
|         sassert_empty(&mut h2); | ||||
|         sassert_done(&mut h2); | ||||
|     } | ||||
|  | ||||
|     #[test] | ||||
| @@ -98,7 +98,7 @@ mod client_request { | ||||
|  | ||||
|         // No more frames | ||||
|         trace!("ensure no more responses"); | ||||
|         sassert_empty(&mut h2); | ||||
|         sassert_done(&mut h2); | ||||
|     } | ||||
|  | ||||
|     #[test] | ||||
| @@ -162,7 +162,7 @@ mod client_request { | ||||
|             _ => panic!("unexpected frame"), | ||||
|         } | ||||
|  | ||||
|         sassert_empty(&mut h2); | ||||
|         sassert_done(&mut h2); | ||||
|     } | ||||
|  | ||||
|     #[test] | ||||
| @@ -226,7 +226,7 @@ mod client_request { | ||||
|             _ => panic!("unexpected frame"), | ||||
|         } | ||||
|  | ||||
|         sassert_empty(&mut h2); | ||||
|         sassert_done(&mut h2); | ||||
|     } | ||||
|  | ||||
|     #[test] | ||||
| @@ -306,7 +306,7 @@ mod client_request { | ||||
|             _ => panic!("unexpected frame"), | ||||
|         } | ||||
|  | ||||
|         sassert_empty(&mut h2); | ||||
|         sassert_done(&mut h2); | ||||
|     } | ||||
|  | ||||
|     #[test] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user