On Fri, 2017-05-19 at 16:30 -0700, Gary Gregory wrote: > Hi All, > > I'm trying to understand the implications of using > a HttpAsyncExpectationVerifier. > > I see only one call site and no tests: >
There are quite a few tests https://github.com/apache/httpcomponents-core/blob/4.4.x/httpcore-nio/s rc/test/java/org/apache/http/nio/integration/TestHttpAsyncHandlers.java #L407 > org.apache.http.nio.protocol.HttpAsyncService.requestReceived(NHttpSe > rverConnection): > > ... > if (this.expectationVerifier != null) { > conn.suspendInput(); > conn.suspendOutput(); > final HttpAsyncExchange httpAsyncExchange = new > HttpAsyncExchangeImpl( > request, ack, state, conn, context); > this.expectationVerifier.verify(httpAsyncExchange > , > context); > } else { > conn.submitResponse(ack); > state.setRequestState(MessageState.BODY_STREAM); > } > ... > > > So my expectationVerifier MUST eventually: > > (1) call: > > conn.submitResponse(ack); > state.setRequestState(MessageState.BODY_STREAM); > > or (2) throw an HttpException > > Right? > Correct. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
