Search in sources :

Example 1 with HTTP_1_1

use of io.servicetalk.http.api.HttpProtocolVersion.HTTP_1_1 in project servicetalk by apple.

the class HttpRequestEncoderTest method protocolPayloadEndOutboundShouldNotTriggerOnFailedFlush.

@Test
void protocolPayloadEndOutboundShouldNotTriggerOnFailedFlush() throws Exception {
    AtomicReference<CloseHandler> closeHandlerRef = new AtomicReference<>();
    try (CompositeCloseable resources = newCompositeCloseable()) {
        Processor serverCloseTrigger = newCompletableProcessor();
        CountDownLatch serverChannelLatch = new CountDownLatch(1);
        AtomicReference<Channel> serverChannelRef = new AtomicReference<>();
        ReadOnlyTcpServerConfig sConfig = new TcpServerConfig().asReadOnly();
        ServerContext serverContext = resources.prepend(TcpServerBinder.bind(localAddress(0), sConfig, false, SEC, null, (channel, observer) -> DefaultNettyConnection.initChannel(channel, SEC.bufferAllocator(), SEC.executor(), SEC.ioExecutor(), forPipelinedRequestResponse(false, channel.config()), defaultFlushStrategy(), null, new TcpServerChannelInitializer(sConfig, observer).andThen(channel2 -> {
            serverChannelRef.compareAndSet(null, channel2);
            serverChannelLatch.countDown();
        }), defaultStrategy(), mock(Protocol.class), observer, false, __ -> false), connection -> {
        }).toFuture().get());
        ReadOnlyHttpClientConfig cConfig = new HttpClientConfig().asReadOnly();
        assert cConfig.h1Config() != null;
        NettyConnection<Object, Object> conn = resources.prepend(TcpConnector.connect(null, serverHostAndPort(serverContext), cConfig.tcpConfig(), false, CEC, (channel, connectionObserver) -> {
            CloseHandler closeHandler = spy(forPipelinedRequestResponse(true, channel.config()));
            closeHandlerRef.compareAndSet(null, closeHandler);
            return DefaultNettyConnection.initChannel(channel, CEC.bufferAllocator(), CEC.executor(), CEC.ioExecutor(), closeHandler, defaultFlushStrategy(), null, new TcpClientChannelInitializer(cConfig.tcpConfig(), connectionObserver).andThen(new HttpClientChannelInitializer(getByteBufAllocator(CEC.bufferAllocator()), cConfig.h1Config(), closeHandler)).andThen(channel2 -> channel2.pipeline().addLast(new ChannelInboundHandlerAdapter() {

                @Override
                public void userEventTriggered(ChannelHandlerContext ctx, Object evt) {
                    // Propagate the user event in the pipeline before
                    // triggering the test condition.
                    ctx.fireUserEventTriggered(evt);
                    if (evt instanceof ChannelInputShutdownReadComplete) {
                        serverCloseTrigger.onComplete();
                    }
                }
            })), defaultStrategy(), HTTP_1_1, connectionObserver, true, __ -> false);
        }, NoopTransportObserver.INSTANCE).toFuture().get());
        // The server needs to wait to close the conneciton until after the client has established the connection.
        serverChannelLatch.await();
        Channel serverChannel = serverChannelRef.get();
        assertNotNull(serverChannel);
        assumeFalse(serverChannel instanceof NioSocketChannel, "Windows doesn't emit ChannelInputShutdownReadComplete. Investigation Required.");
        ((SocketChannel) serverChannel).config().setSoLinger(0);
        // Close and send RST concurrently with client write
        serverChannel.close();
        StreamingHttpRequest request = reqRespFactory.post("/closeme");
        fromSource(serverCloseTrigger).toFuture().get();
        Completable write = conn.write(from(request, allocator.fromAscii("Bye"), EmptyHttpHeaders.INSTANCE));
        assertThrows(ExecutionException.class, () -> write.toFuture().get());
        CloseHandler closeHandler = closeHandlerRef.get();
        assertNotNull(closeHandler);
        verify(closeHandler, never()).protocolPayloadEndOutbound(any(), any());
    }
}
Also used : UNSUPPORTED_PROTOCOL_CLOSE_HANDLER(io.servicetalk.transport.netty.internal.CloseHandler.UNSUPPORTED_PROTOCOL_CLOSE_HANDLER) ChannelInputShutdownReadComplete(io.netty.channel.socket.ChannelInputShutdownReadComplete) Protocol(io.servicetalk.transport.api.ConnectionInfo.Protocol) ChannelInboundHandlerAdapter(io.netty.channel.ChannelInboundHandlerAdapter) Assertions.assertNotEquals(org.junit.jupiter.api.Assertions.assertNotEquals) Integer.toHexString(java.lang.Integer.toHexString) TcpServerChannelInitializer(io.servicetalk.tcp.netty.internal.TcpServerChannelInitializer) TcpServerConfig(io.servicetalk.tcp.netty.internal.TcpServerConfig) ReadOnlyTcpServerConfig(io.servicetalk.tcp.netty.internal.ReadOnlyTcpServerConfig) SourceAdapters.fromSource(io.servicetalk.concurrent.api.SourceAdapters.fromSource) HttpRequestMetaDataFactory.newRequestMetaData(io.servicetalk.http.api.HttpRequestMetaDataFactory.newRequestMetaData) HttpExecutionStrategies.defaultStrategy(io.servicetalk.http.api.HttpExecutionStrategies.defaultStrategy) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) Assumptions.assumeFalse(org.junit.jupiter.api.Assumptions.assumeFalse) CONNECTION(io.servicetalk.http.api.HttpHeaderNames.CONNECTION) USER_AGENT(io.servicetalk.http.api.HttpHeaderNames.USER_AGENT) SocketChannel(io.netty.channel.socket.SocketChannel) TcpConnector(io.servicetalk.tcp.netty.internal.TcpConnector) CompositeCloseable(io.servicetalk.concurrent.api.CompositeCloseable) TRANSFER_ENCODING(io.servicetalk.http.api.HttpHeaderNames.TRANSFER_ENCODING) AsyncCloseables.newCompositeCloseable(io.servicetalk.concurrent.api.AsyncCloseables.newCompositeCloseable) DefaultNettyConnection(io.servicetalk.transport.netty.internal.DefaultNettyConnection) CONTENT_LENGTH(io.servicetalk.http.api.HttpHeaderNames.CONTENT_LENGTH) DefaultHttpHeadersFactory(io.servicetalk.http.api.DefaultHttpHeadersFactory) HttpRequestMetaData(io.servicetalk.http.api.HttpRequestMetaData) Test(org.junit.jupiter.api.Test) CountDownLatch(java.util.concurrent.CountDownLatch) TcpClientChannelInitializer(io.servicetalk.tcp.netty.internal.TcpClientChannelInitializer) Buffer(io.servicetalk.buffer.api.Buffer) Processor(io.servicetalk.concurrent.CompletableSource.Processor) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) FlushStrategies.defaultFlushStrategy(io.servicetalk.transport.netty.internal.FlushStrategies.defaultFlushStrategy) CloseHandler(io.servicetalk.transport.netty.internal.CloseHandler) Mockito.mock(org.mockito.Mockito.mock) NioSocketChannel(io.netty.channel.socket.nio.NioSocketChannel) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) DEFAULT_ALLOCATOR(io.servicetalk.buffer.netty.BufferAllocators.DEFAULT_ALLOCATOR) CloseHandler.forPipelinedRequestResponse(io.servicetalk.transport.netty.internal.CloseHandler.forPipelinedRequestResponse) HttpHeaders(io.servicetalk.http.api.HttpHeaders) Mockito.spy(org.mockito.Mockito.spy) AtomicReference(java.util.concurrent.atomic.AtomicReference) EMPTY_BUFFER(io.servicetalk.buffer.api.EmptyBuffer.EMPTY_BUFFER) EmptyHttpHeaders(io.servicetalk.http.api.EmptyHttpHeaders) ChannelHandlerContext(io.netty.channel.ChannelHandlerContext) ByteBuf(io.netty.buffer.ByteBuf) RegisterExtension(org.junit.jupiter.api.extension.RegisterExtension) NettyIoExecutors.createIoExecutor(io.servicetalk.transport.netty.NettyIoExecutors.createIoExecutor) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) StreamingHttpRequest(io.servicetalk.http.api.StreamingHttpRequest) AddressUtils.serverHostAndPort(io.servicetalk.transport.netty.internal.AddressUtils.serverHostAndPort) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) Publisher.from(io.servicetalk.concurrent.api.Publisher.from) Processors.newCompletableProcessor(io.servicetalk.concurrent.api.Processors.newCompletableProcessor) CHUNKED(io.servicetalk.http.api.HttpHeaderValues.CHUNKED) KEEP_ALIVE(io.servicetalk.http.api.HttpHeaderValues.KEEP_ALIVE) ValueSource(org.junit.jupiter.params.provider.ValueSource) AddressUtils.localAddress(io.servicetalk.transport.netty.internal.AddressUtils.localAddress) ServerContext(io.servicetalk.transport.api.ServerContext) StreamingHttpRequestResponseFactory(io.servicetalk.http.api.StreamingHttpRequestResponseFactory) EmbeddedChannel(io.netty.channel.embedded.EmbeddedChannel) Completable(io.servicetalk.concurrent.api.Completable) ExecutionContextExtension(io.servicetalk.transport.netty.internal.ExecutionContextExtension) IOException(java.io.IOException) GET(io.servicetalk.http.api.HttpRequestMethod.GET) TcpServerBinder(io.servicetalk.tcp.netty.internal.TcpServerBinder) Mockito.verify(org.mockito.Mockito.verify) Channel(io.netty.channel.Channel) ExecutionException(java.util.concurrent.ExecutionException) US_ASCII(java.nio.charset.StandardCharsets.US_ASCII) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) Mockito.never(org.mockito.Mockito.never) BufferUtils.getByteBufAllocator(io.servicetalk.buffer.netty.BufferUtils.getByteBufAllocator) String.valueOf(java.lang.String.valueOf) BufferAllocator(io.servicetalk.buffer.api.BufferAllocator) Executors(io.servicetalk.concurrent.api.Executors) NettyConnection(io.servicetalk.transport.netty.internal.NettyConnection) ArrayDeque(java.util.ArrayDeque) NoopTransportObserver(io.servicetalk.transport.netty.internal.NoopTransportObserver) INSTANCE(io.servicetalk.http.api.DefaultHttpHeadersFactory.INSTANCE) HTTP_1_1(io.servicetalk.http.api.HttpProtocolVersion.HTTP_1_1) DefaultStreamingHttpRequestResponseFactory(io.servicetalk.http.api.DefaultStreamingHttpRequestResponseFactory) Completable(io.servicetalk.concurrent.api.Completable) Processor(io.servicetalk.concurrent.CompletableSource.Processor) Processors.newCompletableProcessor(io.servicetalk.concurrent.api.Processors.newCompletableProcessor) ChannelInputShutdownReadComplete(io.netty.channel.socket.ChannelInputShutdownReadComplete) CompositeCloseable(io.servicetalk.concurrent.api.CompositeCloseable) AsyncCloseables.newCompositeCloseable(io.servicetalk.concurrent.api.AsyncCloseables.newCompositeCloseable) ChannelHandlerContext(io.netty.channel.ChannelHandlerContext) ReadOnlyTcpServerConfig(io.servicetalk.tcp.netty.internal.ReadOnlyTcpServerConfig) TcpClientChannelInitializer(io.servicetalk.tcp.netty.internal.TcpClientChannelInitializer) Protocol(io.servicetalk.transport.api.ConnectionInfo.Protocol) SocketChannel(io.netty.channel.socket.SocketChannel) NioSocketChannel(io.netty.channel.socket.nio.NioSocketChannel) EmbeddedChannel(io.netty.channel.embedded.EmbeddedChannel) Channel(io.netty.channel.Channel) TcpServerChannelInitializer(io.servicetalk.tcp.netty.internal.TcpServerChannelInitializer) AtomicReference(java.util.concurrent.atomic.AtomicReference) CountDownLatch(java.util.concurrent.CountDownLatch) TcpServerConfig(io.servicetalk.tcp.netty.internal.TcpServerConfig) ReadOnlyTcpServerConfig(io.servicetalk.tcp.netty.internal.ReadOnlyTcpServerConfig) NioSocketChannel(io.netty.channel.socket.nio.NioSocketChannel) ServerContext(io.servicetalk.transport.api.ServerContext) CloseHandler(io.servicetalk.transport.netty.internal.CloseHandler) StreamingHttpRequest(io.servicetalk.http.api.StreamingHttpRequest) ChannelInboundHandlerAdapter(io.netty.channel.ChannelInboundHandlerAdapter) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 2 with HTTP_1_1

use of io.servicetalk.http.api.HttpProtocolVersion.HTTP_1_1 in project servicetalk by apple.

the class ConnectionAcceptingNettyHttpServerTest method assertConnectionRequestSucceeds.

private void assertConnectionRequestSucceeds(final StreamingHttpRequest request) throws Exception {
    final StreamingHttpResponse response = awaitIndefinitely(streamingHttpClient().reserveConnection(request).flatMap(conn -> conn.request(request)));
    assert response != null;
    assertResponse(response, HTTP_1_1, OK, "");
}
Also used : Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) StreamingHttpResponse(io.servicetalk.http.api.StreamingHttpResponse) TRACE(io.servicetalk.logging.api.LogLevel.TRACE) TimeoutException(java.util.concurrent.TimeoutException) PlatformDependent.normalizedOs(io.netty.util.internal.PlatformDependent.normalizedOs) BlockingTestUtils.awaitIndefinitely(io.servicetalk.concurrent.api.BlockingTestUtils.awaitIndefinitely) BlockingTestUtils.await(io.servicetalk.concurrent.api.BlockingTestUtils.await) StreamingHttpClient(io.servicetalk.http.api.StreamingHttpClient) SO_BACKLOG(io.servicetalk.transport.api.ServiceTalkSocketOptions.SO_BACKLOG) StreamingHttpRequest(io.servicetalk.http.api.StreamingHttpRequest) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) HttpServerBuilder(io.servicetalk.http.api.HttpServerBuilder) Single(io.servicetalk.concurrent.api.Single) SVC_ECHO(io.servicetalk.http.netty.TestServiceStreaming.SVC_ECHO) CONNECT_TIMEOUT(io.servicetalk.transport.api.ServiceTalkSocketOptions.CONNECT_TIMEOUT) MILLISECONDS(java.util.concurrent.TimeUnit.MILLISECONDS) OK(io.servicetalk.http.api.HttpResponseStatus.OK) InetSocketAddress(java.net.InetSocketAddress) GET(io.servicetalk.http.api.HttpRequestMethod.GET) SingleAddressHttpClientBuilder(io.servicetalk.http.api.SingleAddressHttpClientBuilder) Test(org.junit.jupiter.api.Test) ExecutionException(java.util.concurrent.ExecutionException) Matchers.instanceOf(org.hamcrest.Matchers.instanceOf) CACHED(io.servicetalk.http.netty.AbstractNettyHttpServerTest.ExecutorSupplier.CACHED) RetryingHttpRequesterFilter.disableAutoRetries(io.servicetalk.http.netty.RetryingHttpRequesterFilter.disableAutoRetries) LimitingConnectionFactoryFilter.withMax(io.servicetalk.client.api.LimitingConnectionFactoryFilter.withMax) ConnectTimeoutException(io.servicetalk.client.api.ConnectTimeoutException) TRUE(java.lang.Boolean.TRUE) HTTP_1_1(io.servicetalk.http.api.HttpProtocolVersion.HTTP_1_1) SECONDS(java.util.concurrent.TimeUnit.SECONDS) HostAndPort(io.servicetalk.transport.api.HostAndPort) StreamingHttpResponse(io.servicetalk.http.api.StreamingHttpResponse)

Example 3 with HTTP_1_1

use of io.servicetalk.http.api.HttpProtocolVersion.HTTP_1_1 in project servicetalk by apple.

the class MultiAddressUrlHttpClientTest method beforeClass.

@BeforeAll
static void beforeClass() throws Exception {
    afterClassCloseables = newCompositeCloseable();
    client = afterClassCloseables.append(HttpClients.forMultiAddressUrl().followRedirects(new RedirectConfigBuilder().allowNonRelativeRedirects(true).build()).initializer((scheme, address, builder) -> builder.serviceDiscoverer(sdThatSupportsInvalidHostname())).buildStreaming());
    httpService = (ctx, request, factory) -> {
        if (HTTP_1_1.equals(request.version()) && !request.headers().contains(HOST)) {
            return succeeded(factory.badRequest().setHeader(CONTENT_LENGTH, ZERO));
        }
        if (OPTIONS.equals(request.method()) || CONNECT.equals(request.method())) {
            return succeeded(factory.ok().setHeader(CONTENT_LENGTH, ZERO));
        }
        StreamingHttpResponse response;
        try {
            HttpResponseStatus status = HttpResponseStatus.of(parseInt(request.path().substring(1)), "");
            response = factory.newResponse(status);
            final CharSequence locationHeader = request.headers().get(X_REQUESTED_LOCATION);
            if (locationHeader != null) {
                response.headers().set(LOCATION, locationHeader);
            }
        } catch (Exception e) {
            response = factory.badRequest();
        }
        return succeeded(response.setHeader(CONTENT_LENGTH, ZERO).setHeader(X_RECEIVED_REQUEST_TARGET, request.requestTarget()));
    };
    final ServerContext serverCtx = startNewLocalServer(httpService, afterClassCloseables);
    final HostAndPort serverHostAndPort = serverHostAndPort(serverCtx);
    serverHost = serverHostAndPort.hostName();
    serverPort = serverHostAndPort.port();
    hostHeader = hostHeader(serverHostAndPort);
}
Also used : LOCATION(io.servicetalk.http.api.HttpHeaderNames.LOCATION) ServiceDiscovererEvent(io.servicetalk.client.api.ServiceDiscovererEvent) BAD_REQUEST(io.servicetalk.http.api.HttpResponseStatus.BAD_REQUEST) AfterAll(org.junit.jupiter.api.AfterAll) ZERO(io.servicetalk.http.api.HttpHeaderValues.ZERO) CREATED(io.servicetalk.http.api.HttpResponseStatus.CREATED) StreamingHttpClient(io.servicetalk.http.api.StreamingHttpClient) BeforeAll(org.junit.jupiter.api.BeforeAll) Arrays.asList(java.util.Arrays.asList) UNAUTHORIZED(io.servicetalk.http.api.HttpResponseStatus.UNAUTHORIZED) AddressUtils.hostHeader(io.servicetalk.transport.netty.internal.AddressUtils.hostHeader) BlockingTestUtils.awaitIndefinitelyNonNull(io.servicetalk.concurrent.api.BlockingTestUtils.awaitIndefinitelyNonNull) SEE_OTHER(io.servicetalk.http.api.HttpResponseStatus.SEE_OTHER) Matchers.notNullValue(org.hamcrest.Matchers.notNullValue) Collection(java.util.Collection) CompositeCloseable(io.servicetalk.concurrent.api.CompositeCloseable) ServiceDiscoverer(io.servicetalk.client.api.ServiceDiscoverer) CONNECT(io.servicetalk.http.api.HttpRequestMethod.CONNECT) AsyncCloseables.newCompositeCloseable(io.servicetalk.concurrent.api.AsyncCloseables.newCompositeCloseable) CONTENT_LENGTH(io.servicetalk.http.api.HttpHeaderNames.CONTENT_LENGTH) InetSocketAddress(java.net.InetSocketAddress) String.format(java.lang.String.format) Test(org.junit.jupiter.api.Test) Matchers.instanceOf(org.hamcrest.Matchers.instanceOf) List(java.util.List) StreamingHttpService(io.servicetalk.http.api.StreamingHttpService) GlobalDnsServiceDiscoverer.globalDnsServiceDiscoverer(io.servicetalk.http.netty.GlobalDnsServiceDiscoverer.globalDnsServiceDiscoverer) Matchers.is(org.hamcrest.Matchers.is) NOT_IMPLEMENTED(io.servicetalk.http.api.HttpResponseStatus.NOT_IMPLEMENTED) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) StreamingHttpResponse(io.servicetalk.http.api.StreamingHttpResponse) Publisher(io.servicetalk.concurrent.api.Publisher) BAD_GATEWAY(io.servicetalk.http.api.HttpResponseStatus.BAD_GATEWAY) RedirectConfigBuilder(io.servicetalk.http.api.RedirectConfigBuilder) Single.succeeded(io.servicetalk.concurrent.api.Single.succeeded) HOST(io.servicetalk.http.api.HttpHeaderNames.HOST) StreamingHttpRequest(io.servicetalk.http.api.StreamingHttpRequest) AddressUtils.serverHostAndPort(io.servicetalk.transport.netty.internal.AddressUtils.serverHostAndPort) OPTIONS(io.servicetalk.http.api.HttpRequestMethod.OPTIONS) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) INTERNAL_SERVER_ERROR(io.servicetalk.http.api.HttpResponseStatus.INTERNAL_SERVER_ERROR) AddressUtils.localAddress(io.servicetalk.transport.netty.internal.AddressUtils.localAddress) ServerContext(io.servicetalk.transport.api.ServerContext) MalformedURLException(java.net.MalformedURLException) Completable(io.servicetalk.concurrent.api.Completable) ACCEPTED(io.servicetalk.http.api.HttpResponseStatus.ACCEPTED) OK(io.servicetalk.http.api.HttpResponseStatus.OK) UnknownHostException(java.net.UnknownHostException) SourceAdapters.toSource(io.servicetalk.concurrent.api.SourceAdapters.toSource) Integer.parseInt(java.lang.Integer.parseInt) ExecutionException(java.util.concurrent.ExecutionException) FORBIDDEN(io.servicetalk.http.api.HttpResponseStatus.FORBIDDEN) PERMANENT_REDIRECT(io.servicetalk.http.api.HttpResponseStatus.PERMANENT_REDIRECT) Completable.completed(io.servicetalk.concurrent.api.Completable.completed) TestSingleSubscriber(io.servicetalk.concurrent.test.internal.TestSingleSubscriber) HttpResponseStatus(io.servicetalk.http.api.HttpResponseStatus) HTTP_1_1(io.servicetalk.http.api.HttpProtocolVersion.HTTP_1_1) MOVED_PERMANENTLY(io.servicetalk.http.api.HttpResponseStatus.MOVED_PERMANENTLY) HostAndPort(io.servicetalk.transport.api.HostAndPort) AddressUtils.serverHostAndPort(io.servicetalk.transport.netty.internal.AddressUtils.serverHostAndPort) HostAndPort(io.servicetalk.transport.api.HostAndPort) ServerContext(io.servicetalk.transport.api.ServerContext) HttpResponseStatus(io.servicetalk.http.api.HttpResponseStatus) RedirectConfigBuilder(io.servicetalk.http.api.RedirectConfigBuilder) StreamingHttpResponse(io.servicetalk.http.api.StreamingHttpResponse) MalformedURLException(java.net.MalformedURLException) UnknownHostException(java.net.UnknownHostException) ExecutionException(java.util.concurrent.ExecutionException) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

HTTP_1_1 (io.servicetalk.http.api.HttpProtocolVersion.HTTP_1_1)3 StreamingHttpRequest (io.servicetalk.http.api.StreamingHttpRequest)3 AsyncCloseables.newCompositeCloseable (io.servicetalk.concurrent.api.AsyncCloseables.newCompositeCloseable)2 Completable (io.servicetalk.concurrent.api.Completable)2 CompositeCloseable (io.servicetalk.concurrent.api.CompositeCloseable)2 CONTENT_LENGTH (io.servicetalk.http.api.HttpHeaderNames.CONTENT_LENGTH)2 GET (io.servicetalk.http.api.HttpRequestMethod.GET)2 ExecutionException (java.util.concurrent.ExecutionException)2 Assertions.assertThrows (org.junit.jupiter.api.Assertions.assertThrows)2 Test (org.junit.jupiter.api.Test)2 ByteBuf (io.netty.buffer.ByteBuf)1 Channel (io.netty.channel.Channel)1 ChannelHandlerContext (io.netty.channel.ChannelHandlerContext)1 ChannelInboundHandlerAdapter (io.netty.channel.ChannelInboundHandlerAdapter)1 EmbeddedChannel (io.netty.channel.embedded.EmbeddedChannel)1 ChannelInputShutdownReadComplete (io.netty.channel.socket.ChannelInputShutdownReadComplete)1 SocketChannel (io.netty.channel.socket.SocketChannel)1 NioSocketChannel (io.netty.channel.socket.nio.NioSocketChannel)1 PlatformDependent.normalizedOs (io.netty.util.internal.PlatformDependent.normalizedOs)1 Buffer (io.servicetalk.buffer.api.Buffer)1