diff --git a/langstream-api-gateway/src/test/java/ai/langstream/apigateway/http/GatewayResourceTest.java b/langstream-api-gateway/src/test/java/ai/langstream/apigateway/http/GatewayResourceTest.java index 5bb3f8e81..7d1e83344 100644 --- a/langstream-api-gateway/src/test/java/ai/langstream/apigateway/http/GatewayResourceTest.java +++ b/langstream-api-gateway/src/test/java/ai/langstream/apigateway/http/GatewayResourceTest.java @@ -569,8 +569,11 @@ void testService() throws Exception { url, "{\"key\": \"my-key2\", \"value\": \"my-value\", \"headers\": {\"header1\":\"value1\"}}")); + // sorry but kafka can't keep up + final int numParallel = getStreamingCluster().type().equals("kafka") ? 5 : 30; + List> futures1 = new ArrayList<>(); - for (int i = 0; i < 30; i++) { + for (int i = 0; i < numParallel; i++) { CompletableFuture future = CompletableFuture.runAsync( () -> {