From 4174ccedf7261d850b028d21b273ad50354dc765 Mon Sep 17 00:00:00 2001 From: Michal Karm Babacek Date: Mon, 11 Nov 2024 17:38:40 +0100 Subject: [PATCH] Test loads brotli to do compression --- .../src/test/java/io/quarkus/compressors/it/Testflow.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/integration-tests/vertx-http-compressors/app/src/test/java/io/quarkus/compressors/it/Testflow.java b/integration-tests/vertx-http-compressors/app/src/test/java/io/quarkus/compressors/it/Testflow.java index f8a60d61c60ad..3f1e72cf6eb71 100644 --- a/integration-tests/vertx-http-compressors/app/src/test/java/io/quarkus/compressors/it/Testflow.java +++ b/integration-tests/vertx-http-compressors/app/src/test/java/io/quarkus/compressors/it/Testflow.java @@ -17,6 +17,7 @@ import java.util.zip.DeflaterOutputStream; import java.util.zip.GZIPOutputStream; +import com.aayushatharva.brotli4j.Brotli4jLoader; import com.aayushatharva.brotli4j.encoder.BrotliOutputStream; import io.netty.buffer.ByteBuf; @@ -39,6 +40,11 @@ public class Testflow { // Vert.x/Netty versions over time. public static final int COMPRESSION_TOLERANCE_PERCENT = 2; + static { + // Our test code does compression + Brotli4jLoader.ensureAvailability(); + } + /** * This test logic is shared by both "all" module and "some" module. See their RESTEndpointsTest classes. * @@ -121,6 +127,7 @@ public static void runDecompressorsTest(String endpoint, String acceptEncoding, client.postAbs(endpoint) .putHeader(HttpHeaders.CONTENT_ENCODING.toString(), contentEncoding) .putHeader(HttpHeaders.ACCEPT.toString(), "*/*") + .putHeader(HttpHeaders.USER_AGENT.toString(), "Tester") .sendBuffer(compress(contentEncoding, TEXT), ar -> { if (ar.succeeded()) { future.complete(ar.result());