@Test public void responseWriteFailsInSendingResponseState() throws Exception { RuntimeException cause = new RuntimeException("Response write failed"); setupHandlerTo(SENDING_RESPONSE); writerFuture.completeExceptionally(cause); assertThat(responseUnsubscribed.get(), is(true)); verify(statsCollector).onTerminate(request.id()); verify(errorListener).proxyWriteFailure(any(LiveHttpRequest.class), eq(response(OK).build()), any(RuntimeException.class)); assertThat(handler.state(), is(TERMINATED)); }
@VisibleForTesting State state() { return this.stateMachine.currentState(); }
HttpPipelineHandler extends SimpleChannelInboundHandler<LiveHttpRequest> { @VisibleForTesting State state() { return this.stateMachine.currentState(); } }
HttpPipelineHandler extends SimpleChannelInboundHandler<LiveHttpRequest> { @VisibleForTesting State state() { return this.stateMachine.currentState(); } private  HttpPipelineHandler(Builder builder, RequestTracker tracker); }
HttpPipelineHandler extends SimpleChannelInboundHandler<LiveHttpRequest> { @VisibleForTesting State state() { return this.stateMachine.currentState(); } private  HttpPipelineHandler(Builder builder, RequestTracker tracker); @Override void channelActive(ChannelHandlerContext ctx); @Override void channelInactive(ChannelHandlerContext ctx); @Override void exceptionCaught(ChannelHandlerContext ctx, Throwable cause); }
HttpPipelineHandler extends SimpleChannelInboundHandler<LiveHttpRequest> { @VisibleForTesting State state() { return this.stateMachine.currentState(); } private  HttpPipelineHandler(Builder builder, RequestTracker tracker); @Override void channelActive(ChannelHandlerContext ctx); @Override void channelInactive(ChannelHandlerContext ctx); @Override void exceptionCaught(ChannelHandlerContext ctx, Throwable cause);  }