Search in sources :

Example 1 with DEFAULT_ALLOCATOR

use of io.servicetalk.buffer.netty.BufferAllocators.DEFAULT_ALLOCATOR in project servicetalk by apple.

the class CustomTransportTest method testCustomTransport.

@ParameterizedTest
@EnumSource(ServiceType.class)
void testCustomTransport(final ServiceType serviceType) throws Exception {
    // You can re-use the EventLoopGroup used by your Netty application, we create one to demonstrate its use.
    EventLoopAwareNettyIoExecutor ioExecutor = createIoExecutor("netty-el");
    // This is the Netty channel which is reading the request. See getServiceContext(Channel), depending
    // upon what control you want to give users knowing this may not be necessary.
    Channel c = new EmbeddedChannel();
    try {
        ServerTransport serverTransport = new InMemoryServerTransport(DEFAULT_ALLOCATOR, serviceType.grpcService);
        // Build the client with the custom transport and bridge to server's transport.
        Tester.TesterClient client = new Tester.ClientFactory() {

            @Override
            public TesterClient newClient(final GrpcClientCallFactory factory) {
                return super.newClient(factory);
            }
        }.newClient(new ClientTransportGrpcCallFactory(// Build the client transport, which just calls the server transport directly.
        (method, requestMessages) -> serverTransport.handle(c, "clientId", method, requestMessages), ioExecutor.eventLoopGroup()));
        // Test using the client.
        assertThat(client.test(newReq("scalar")).toFuture().get(), is(newResp("hello scalar")));
        assertThat(client.testRequestStream(newReqStream("req")).toFuture().get(), is(newResp("hello reqstream1, reqstream2, ")));
        assertThat(client.testResponseStream(newReq("respStream")).toFuture().get(), contains(newResp("hello respStream1"), newResp("hello respStream2")));
        assertThat(client.testBiDiStream(newReqStream("duplex")).toFuture().get(), contains(newResp("hello duplexstream1"), newResp("hello duplexstream2")));
    } finally {
        c.close();
        ioExecutor.closeAsync().toFuture().get();
    }
}
Also used : EventLoopAwareNettyIoExecutor(io.servicetalk.transport.netty.internal.EventLoopAwareNettyIoExecutor) DEFAULT_ALLOCATOR(io.servicetalk.buffer.netty.BufferAllocators.DEFAULT_ALLOCATOR) Publisher(io.servicetalk.concurrent.api.Publisher) NettyIoExecutors.createIoExecutor(io.servicetalk.transport.netty.internal.NettyIoExecutors.createIoExecutor) EmbeddedChannel(io.netty.channel.embedded.EmbeddedChannel) EnumSource(org.junit.jupiter.params.provider.EnumSource) TestRequest(io.servicetalk.grpc.netty.TesterProto.TestRequest) Utils.newResp(io.servicetalk.grpc.customtransport.Utils.newResp) Channel(io.netty.channel.Channel) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) GrpcBindableService(io.servicetalk.grpc.api.GrpcBindableService) Matchers.contains(org.hamcrest.Matchers.contains) GrpcClientCallFactory(io.servicetalk.grpc.api.GrpcClientCallFactory) TesterClient(io.servicetalk.grpc.netty.TesterProto.Tester.TesterClient) Matchers.is(org.hamcrest.Matchers.is) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Publisher.from(io.servicetalk.concurrent.api.Publisher.from) Tester(io.servicetalk.grpc.netty.TesterProto.Tester) Tester(io.servicetalk.grpc.netty.TesterProto.Tester) EmbeddedChannel(io.netty.channel.embedded.EmbeddedChannel) Channel(io.netty.channel.Channel) EventLoopAwareNettyIoExecutor(io.servicetalk.transport.netty.internal.EventLoopAwareNettyIoExecutor) EmbeddedChannel(io.netty.channel.embedded.EmbeddedChannel) TesterClient(io.servicetalk.grpc.netty.TesterProto.Tester.TesterClient) GrpcClientCallFactory(io.servicetalk.grpc.api.GrpcClientCallFactory) TesterClient(io.servicetalk.grpc.netty.TesterProto.Tester.TesterClient) EnumSource(org.junit.jupiter.params.provider.EnumSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 2 with DEFAULT_ALLOCATOR

use of io.servicetalk.buffer.netty.BufferAllocators.DEFAULT_ALLOCATOR in project servicetalk by apple.

the class NettyHttpServerConnectionTest method updateFlushStrategy.

@ParameterizedTest(name = "server={0} client={1}")
@MethodSource("executionStrategies")
void updateFlushStrategy(HttpExecutionStrategy serverExecutionStrategy, HttpExecutionStrategy clientExecutionStrategy) throws Exception {
    customStrategy = new MockFlushStrategy();
    AtomicReference<Cancellable> customCancellableRef = new AtomicReference<>();
    AtomicBoolean handledFirstRequest = new AtomicBoolean();
    serverContext = HttpServers.forAddress(localAddress(0)).ioExecutor(contextRule.ioExecutor()).appendConnectionAcceptorFilter(original -> original.append(ctx -> {
        customCancellableRef.set(((NettyConnectionContext) ctx).updateFlushStrategy((__, ___) -> customStrategy));
        return completed();
    })).executionStrategy(serverExecutionStrategy).listenStreaming((ctx, request, responseFactory) -> {
        if (handledFirstRequest.compareAndSet(false, true)) {
            customStrategy.afterFirstWrite(FlushStrategy.FlushSender::flush);
            return succeeded(responseFactory.ok().payloadBody(responsePublisher));
        }
        return succeeded(responseFactory.ok().payloadBody(responsePublisher2));
    }).toFuture().get();
    client = HttpClients.forSingleAddress(serverHostAndPort(serverContext)).executionStrategy(clientExecutionStrategy).buildStreaming();
    StreamingHttpResponse response = client.request(client.newRequest(GET, "/1")).toFuture().get();
    FlushStrategy.FlushSender customFlushSender = customStrategy.verifyApplied();
    Cancellable customCancellable = customCancellableRef.get();
    assertNotNull(customCancellable);
    // Verify that the custom strategy is applied and used for flushing.
    customStrategy.verifyWriteStarted();
    customStrategy.verifyItemWritten(1);
    customStrategy.verifyNoMoreInteractions();
    String payloadBodyString = "foo";
    TestSubscription testSubscription1 = new TestSubscription();
    responsePublisher.onSubscribe(testSubscription1);
    testSubscription1.awaitRequestN(1);
    responsePublisher.onNext(DEFAULT_ALLOCATOR.fromAscii(payloadBodyString));
    responsePublisher.onComplete();
    customFlushSender.flush();
    Buffer responsePayload = response.payloadBody().collect(DEFAULT_ALLOCATOR::newBuffer, (results, current) -> {
        results.writeBytes(current);
        return results;
    }).toFuture().get();
    assertEquals(payloadBodyString, responsePayload.toString(US_ASCII));
    customStrategy.verifyItemWritten(2);
    customStrategy.verifyWriteTerminated();
    // Restore the default flush strategy, which should flush on each
    customCancellable.cancel();
    StreamingHttpResponse response2 = client.request(client.newRequest(GET, "/2")).toFuture().get();
    TestSubscription testSubscription2 = new TestSubscription();
    responsePublisher2.onSubscribe(testSubscription2);
    responsePublisher2.onNext(DEFAULT_ALLOCATOR.fromAscii(payloadBodyString));
    responsePublisher2.onComplete();
    responsePayload = response2.payloadBody().collect(DEFAULT_ALLOCATOR::newBuffer, (results, current) -> {
        results.writeBytes(current);
        return results;
    }).toFuture().get();
    assertEquals(payloadBodyString, responsePayload.toString(US_ASCII));
}
Also used : FlushStrategy(io.servicetalk.transport.netty.internal.FlushStrategy) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) StreamingHttpResponse(io.servicetalk.http.api.StreamingHttpResponse) DEFAULT_ALLOCATOR(io.servicetalk.buffer.netty.BufferAllocators.DEFAULT_ALLOCATOR) TestPublisher(io.servicetalk.concurrent.api.TestPublisher) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Cancellable(io.servicetalk.concurrent.Cancellable) AtomicReference(java.util.concurrent.atomic.AtomicReference) HttpExecutionStrategies.defaultStrategy(io.servicetalk.http.api.HttpExecutionStrategies.defaultStrategy) StreamingHttpClient(io.servicetalk.http.api.StreamingHttpClient) RegisterExtension(org.junit.jupiter.api.extension.RegisterExtension) Single.succeeded(io.servicetalk.concurrent.api.Single.succeeded) HttpExecutionStrategy(io.servicetalk.http.api.HttpExecutionStrategy) AddressUtils.serverHostAndPort(io.servicetalk.transport.netty.internal.AddressUtils.serverHostAndPort) NettyConnectionContext(io.servicetalk.transport.netty.internal.NettyConnectionContext) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) MethodSource(org.junit.jupiter.params.provider.MethodSource) AddressUtils.localAddress(io.servicetalk.transport.netty.internal.AddressUtils.localAddress) ExecutionContextExtension.immediate(io.servicetalk.transport.netty.internal.ExecutionContextExtension.immediate) ServerContext(io.servicetalk.transport.api.ServerContext) ExecutionContextExtension(io.servicetalk.transport.netty.internal.ExecutionContextExtension) AsyncCloseables.newCompositeCloseable(io.servicetalk.concurrent.api.AsyncCloseables.newCompositeCloseable) Arguments(org.junit.jupiter.params.provider.Arguments) TestSubscription(io.servicetalk.concurrent.api.TestSubscription) GET(io.servicetalk.http.api.HttpRequestMethod.GET) US_ASCII(java.nio.charset.StandardCharsets.US_ASCII) AfterEach(org.junit.jupiter.api.AfterEach) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) Buffer(io.servicetalk.buffer.api.Buffer) Stream(java.util.stream.Stream) Completable.completed(io.servicetalk.concurrent.api.Completable.completed) MockFlushStrategy(io.servicetalk.transport.netty.internal.MockFlushStrategy) HttpExecutionStrategies.offloadNever(io.servicetalk.http.api.HttpExecutionStrategies.offloadNever) TestSubscription(io.servicetalk.concurrent.api.TestSubscription) Buffer(io.servicetalk.buffer.api.Buffer) Cancellable(io.servicetalk.concurrent.Cancellable) MockFlushStrategy(io.servicetalk.transport.netty.internal.MockFlushStrategy) AtomicReference(java.util.concurrent.atomic.AtomicReference) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) DEFAULT_ALLOCATOR(io.servicetalk.buffer.netty.BufferAllocators.DEFAULT_ALLOCATOR) FlushStrategy(io.servicetalk.transport.netty.internal.FlushStrategy) MockFlushStrategy(io.servicetalk.transport.netty.internal.MockFlushStrategy) StreamingHttpResponse(io.servicetalk.http.api.StreamingHttpResponse) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 3 with DEFAULT_ALLOCATOR

use of io.servicetalk.buffer.netty.BufferAllocators.DEFAULT_ALLOCATOR in project servicetalk by apple.

the class PayloadSizeLimitingHttpServiceFilterTest method moreThanMaxRejected.

@Test
void moreThanMaxRejected() {
    ExecutionException e = assertThrows(ExecutionException.class, () -> new PayloadSizeLimitingHttpServiceFilter(100).create((ctx, request, responseFactory) -> succeeded(responseFactory.ok().payloadBody(request.payloadBody()))).handle(mock(HttpServiceContext.class), REQ_RESP_FACTORY.post("/").payloadBody(newBufferPublisher(101, DEFAULT_ALLOCATOR)), REQ_RESP_FACTORY).toFuture().get().payloadBody().toFuture().get());
    assertThat(e.getCause(), instanceOf(PayloadTooLargeException.class));
}
Also used : ValueSource(org.junit.jupiter.params.provider.ValueSource) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) DEFAULT_ALLOCATOR(io.servicetalk.buffer.netty.BufferAllocators.DEFAULT_ALLOCATOR) PayloadSizeLimitingHttpRequesterFilterTest.newBufferPublisher(io.servicetalk.http.utils.PayloadSizeLimitingHttpRequesterFilterTest.newBufferPublisher) REQ_RESP_FACTORY(io.servicetalk.http.utils.PayloadSizeLimitingHttpRequesterFilterTest.REQ_RESP_FACTORY) Test(org.junit.jupiter.api.Test) ExecutionException(java.util.concurrent.ExecutionException) Matchers.instanceOf(org.hamcrest.Matchers.instanceOf) PayloadTooLargeException(io.servicetalk.http.api.PayloadTooLargeException) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) HttpServiceContext(io.servicetalk.http.api.HttpServiceContext) Single.succeeded(io.servicetalk.concurrent.api.Single.succeeded) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Mockito.mock(org.mockito.Mockito.mock) HttpServiceContext(io.servicetalk.http.api.HttpServiceContext) PayloadTooLargeException(io.servicetalk.http.api.PayloadTooLargeException) ExecutionException(java.util.concurrent.ExecutionException) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 4 with DEFAULT_ALLOCATOR

use of io.servicetalk.buffer.netty.BufferAllocators.DEFAULT_ALLOCATOR in project servicetalk by apple.

the class RequestTargetEncoderHttpServiceFilterTest method invokeServiceAssertValue.

private void invokeServiceAssertValue(String requestTarget, String expectedPayload) throws Exception {
    StreamingHttpResponse response = new RequestTargetEncoderHttpServiceFilter().create(mockService).handle(mockCtx, reqRespFactory.get(requestTarget), reqRespFactory).toFuture().get();
    String payload = response.payloadBody().collect(DEFAULT_ALLOCATOR::newCompositeBuffer, (composite, buf) -> {
        composite.addBuffer(buf);
        return composite;
    }).toFuture().get().toString(US_ASCII);
    assertThat(payload, is(expectedPayload));
}
Also used : CoreMatchers.is(org.hamcrest.CoreMatchers.is) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) BeforeEach(org.junit.jupiter.api.BeforeEach) StreamingHttpResponse(io.servicetalk.http.api.StreamingHttpResponse) DEFAULT_ALLOCATOR(io.servicetalk.buffer.netty.BufferAllocators.DEFAULT_ALLOCATOR) Answer(org.mockito.stubbing.Answer) HttpServiceContext(io.servicetalk.http.api.HttpServiceContext) Mockito.doAnswer(org.mockito.Mockito.doAnswer) TestHttpServiceContext(io.servicetalk.http.api.TestHttpServiceContext) StreamingHttpRequest(io.servicetalk.http.api.StreamingHttpRequest) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Publisher.from(io.servicetalk.concurrent.api.Publisher.from) HttpExecutionContext(io.servicetalk.http.api.HttpExecutionContext) Character.toUpperCase(java.lang.Character.toUpperCase) StreamingHttpRequestResponseFactory(io.servicetalk.http.api.StreamingHttpRequestResponseFactory) Single(io.servicetalk.concurrent.api.Single) Mockito.when(org.mockito.Mockito.when) OK(io.servicetalk.http.api.HttpResponseStatus.OK) DefaultHttpHeadersFactory(io.servicetalk.http.api.DefaultHttpHeadersFactory) Test(org.junit.jupiter.api.Test) US_ASCII(java.nio.charset.StandardCharsets.US_ASCII) Character.forDigit(java.lang.Character.forDigit) StreamingHttpService(io.servicetalk.http.api.StreamingHttpService) HTTP_1_1(io.servicetalk.http.api.HttpProtocolVersion.HTTP_1_1) DefaultStreamingHttpRequestResponseFactory(io.servicetalk.http.api.DefaultStreamingHttpRequestResponseFactory) Mockito.mock(org.mockito.Mockito.mock) StreamingHttpResponse(io.servicetalk.http.api.StreamingHttpResponse)

Example 5 with DEFAULT_ALLOCATOR

use of io.servicetalk.buffer.netty.BufferAllocators.DEFAULT_ALLOCATOR in project servicetalk by apple.

the class FlushStrategyOnServerTest method setUp.

private void setUp(final Param param) {
    this.interceptor = new OutboundWriteEventsInterceptor();
    this.headersFactory = DefaultHttpHeadersFactory.INSTANCE;
    final StreamingHttpService service = (ctx, request, responseFactory) -> {
        StreamingHttpResponse resp = responseFactory.ok();
        if (request.headers().get(USE_EMPTY_RESP_BODY) == null) {
            resp.payloadBody(from("Hello", "World"), appSerializerUtf8FixLen());
        }
        if (request.headers().get(USE_AGGREGATED_RESP) != null) {
            return resp.toResponse().map(HttpResponse::toStreamingResponse);
        }
        return succeeded(resp);
    };
    final DefaultHttpExecutionContext httpExecutionContext = new DefaultHttpExecutionContext(DEFAULT_ALLOCATOR, globalExecutionContext().ioExecutor(), EXECUTOR_RULE.executor(), param.executionStrategy);
    final ReadOnlyHttpServerConfig config = new HttpServerConfig().asReadOnly();
    final ReadOnlyTcpServerConfig tcpReadOnly = new TcpServerConfig().asReadOnly();
    try {
        serverContext = TcpServerBinder.bind(localAddress(0), tcpReadOnly, true, httpExecutionContext, null, (channel, observer) -> {
            final ConnectionObserver connectionObserver = config.tcpConfig().transportObserver().onNewConnection(channel.localAddress(), channel.remoteAddress());
            return initChannel(channel, httpExecutionContext, config, new TcpServerChannelInitializer(tcpReadOnly, connectionObserver).andThen(channel1 -> channel1.pipeline().addLast(interceptor)), service, true, connectionObserver);
        }, connection -> connection.process(true)).map(delegate -> new NettyHttpServerContext(delegate, service, httpExecutionContext)).toFuture().get();
    } catch (Exception e) {
        fail(e);
    }
    client = HttpClients.forSingleAddress(serverHostAndPort(serverContext)).protocols(h1Default()).buildBlocking();
}
Also used : DefaultHttpExecutionContext(io.servicetalk.http.api.DefaultHttpExecutionContext) TcpServerChannelInitializer(io.servicetalk.tcp.netty.internal.TcpServerChannelInitializer) TcpServerConfig(io.servicetalk.tcp.netty.internal.TcpServerConfig) ReadOnlyTcpServerConfig(io.servicetalk.tcp.netty.internal.ReadOnlyTcpServerConfig) ChannelPromise(io.netty.channel.ChannelPromise) HttpExecutionStrategies.defaultStrategy(io.servicetalk.http.api.HttpExecutionStrategies.defaultStrategy) Executor(io.servicetalk.concurrent.api.Executor) GlobalExecutionContext.globalExecutionContext(io.servicetalk.transport.netty.internal.GlobalExecutionContext.globalExecutionContext) BlockingHttpClient(io.servicetalk.http.api.BlockingHttpClient) ChannelOutboundHandlerAdapter(io.netty.channel.ChannelOutboundHandlerAdapter) ExecutorExtension(io.servicetalk.concurrent.api.ExecutorExtension) HttpResponse(io.servicetalk.http.api.HttpResponse) TRANSFER_ENCODING(io.servicetalk.http.api.HttpHeaderNames.TRANSFER_ENCODING) BlockingQueue(java.util.concurrent.BlockingQueue) DefaultHttpHeadersFactory(io.servicetalk.http.api.DefaultHttpHeadersFactory) HttpExecutionStrategies.customStrategyBuilder(io.servicetalk.http.api.HttpExecutionStrategies.customStrategyBuilder) StreamingHttpService(io.servicetalk.http.api.StreamingHttpService) Matchers.greaterThan(org.hamcrest.Matchers.greaterThan) Matchers.is(org.hamcrest.Matchers.is) Assertions.fail(org.junit.jupiter.api.Assertions.fail) StreamingHttpResponse(io.servicetalk.http.api.StreamingHttpResponse) DEFAULT_ALLOCATOR(io.servicetalk.buffer.netty.BufferAllocators.DEFAULT_ALLOCATOR) StreamingHttpRequests.newTransportRequest(io.servicetalk.http.api.StreamingHttpRequests.newTransportRequest) HttpHeaders(io.servicetalk.http.api.HttpHeaders) EnumSource(org.junit.jupiter.params.provider.EnumSource) NettyHttpServer.initChannel(io.servicetalk.http.netty.NettyHttpServer.initChannel) ChannelHandlerContext(io.netty.channel.ChannelHandlerContext) ConnectionObserver(io.servicetalk.transport.api.ConnectionObserver) HttpProtocolConfigs.h1Default(io.servicetalk.http.netty.HttpProtocolConfigs.h1Default) RegisterExtension(org.junit.jupiter.api.extension.RegisterExtension) Single.succeeded(io.servicetalk.concurrent.api.Single.succeeded) HttpSerializers.appSerializerUtf8FixLen(io.servicetalk.http.api.HttpSerializers.appSerializerUtf8FixLen) HttpExecutionStrategy(io.servicetalk.http.api.HttpExecutionStrategy) StreamingHttpRequest(io.servicetalk.http.api.StreamingHttpRequest) AddressUtils.serverHostAndPort(io.servicetalk.transport.netty.internal.AddressUtils.serverHostAndPort) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Publisher.from(io.servicetalk.concurrent.api.Publisher.from) CHUNKED(io.servicetalk.http.api.HttpHeaderValues.CHUNKED) AddressUtils.localAddress(io.servicetalk.transport.netty.internal.AddressUtils.localAddress) ServerContext(io.servicetalk.transport.api.ServerContext) GET(io.servicetalk.http.api.HttpRequestMethod.GET) TcpServerBinder(io.servicetalk.tcp.netty.internal.TcpServerBinder) NettyHttpServerContext(io.servicetalk.http.netty.NettyHttpServer.NettyHttpServerContext) AfterEach(org.junit.jupiter.api.AfterEach) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) LinkedBlockingDeque(java.util.concurrent.LinkedBlockingDeque) HttpHeadersFactory(io.servicetalk.http.api.HttpHeadersFactory) HTTP_1_1(io.servicetalk.http.api.HttpProtocolVersion.HTTP_1_1) HttpExecutionStrategies.offloadNever(io.servicetalk.http.api.HttpExecutionStrategies.offloadNever) NettyHttpServerContext(io.servicetalk.http.netty.NettyHttpServer.NettyHttpServerContext) TcpServerChannelInitializer(io.servicetalk.tcp.netty.internal.TcpServerChannelInitializer) DefaultHttpExecutionContext(io.servicetalk.http.api.DefaultHttpExecutionContext) TcpServerConfig(io.servicetalk.tcp.netty.internal.TcpServerConfig) ReadOnlyTcpServerConfig(io.servicetalk.tcp.netty.internal.ReadOnlyTcpServerConfig) ConnectionObserver(io.servicetalk.transport.api.ConnectionObserver) StreamingHttpService(io.servicetalk.http.api.StreamingHttpService) ReadOnlyTcpServerConfig(io.servicetalk.tcp.netty.internal.ReadOnlyTcpServerConfig) StreamingHttpResponse(io.servicetalk.http.api.StreamingHttpResponse)

Aggregations

DEFAULT_ALLOCATOR (io.servicetalk.buffer.netty.BufferAllocators.DEFAULT_ALLOCATOR)6 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)5 Publisher.from (io.servicetalk.concurrent.api.Publisher.from)3 Single.succeeded (io.servicetalk.concurrent.api.Single.succeeded)3 StreamingHttpResponse (io.servicetalk.http.api.StreamingHttpResponse)3 MatcherAssert.assertThat (org.hamcrest.MatcherAssert.assertThat)3 Buffer (io.servicetalk.buffer.api.Buffer)2 DefaultHttpHeadersFactory (io.servicetalk.http.api.DefaultHttpHeadersFactory)2 HttpExecutionStrategies.defaultStrategy (io.servicetalk.http.api.HttpExecutionStrategies.defaultStrategy)2 HttpExecutionStrategies.offloadNever (io.servicetalk.http.api.HttpExecutionStrategies.offloadNever)2 HttpExecutionStrategy (io.servicetalk.http.api.HttpExecutionStrategy)2 HTTP_1_1 (io.servicetalk.http.api.HttpProtocolVersion.HTTP_1_1)2 GET (io.servicetalk.http.api.HttpRequestMethod.GET)2 HttpServiceContext (io.servicetalk.http.api.HttpServiceContext)2 StreamingHttpRequest (io.servicetalk.http.api.StreamingHttpRequest)2 StreamingHttpService (io.servicetalk.http.api.StreamingHttpService)2 US_ASCII (java.nio.charset.StandardCharsets.US_ASCII)2 Test (org.junit.jupiter.api.Test)2 Mockito.mock (org.mockito.Mockito.mock)2 Channel (io.netty.channel.Channel)1