Skip to content

Commit

Permalink
add brotli4j native libs to [codec-http2] pom.xml (#13177)
Browse files Browse the repository at this point in the history
Motivation:

the brotli4j native libraries are missing from the [codec-http2] module

Modification:

added brotli4j native libraries to codec-http2/pom.xml

Result:

DataCompressionHttp2Test all tests pass.
  • Loading branch information
sullis committed Feb 2, 2023
1 parent f18d8f5 commit 0710751
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
30 changes: 30 additions & 0 deletions codec-http2/pom.xml
Expand Up @@ -91,6 +91,36 @@
<artifactId>brotli4j</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.aayushatharva.brotli4j</groupId>
<artifactId>native-linux-x86_64</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.aayushatharva.brotli4j</groupId>
<artifactId>native-linux-aarch64</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.aayushatharva.brotli4j</groupId>
<artifactId>native-linux-armv7</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.aayushatharva.brotli4j</groupId>
<artifactId>native-osx-x86_64</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.aayushatharva.brotli4j</groupId>
<artifactId>native-osx-aarch64</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.aayushatharva.brotli4j</groupId>
<artifactId>native-windows-x86_64</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.luben</groupId>
<artifactId>zstd-jni</artifactId>
Expand Down
Expand Up @@ -28,6 +28,7 @@
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.codec.compression.Brotli;
import io.netty.handler.codec.http.HttpHeaderNames;
import io.netty.handler.codec.http.HttpHeaderValues;
import io.netty.handler.codec.http2.Http2TestUtil.Http2Runnable;
Expand All @@ -36,6 +37,7 @@
import io.netty.util.NetUtil;
import io.netty.util.concurrent.Future;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.Mock;
Expand Down Expand Up @@ -88,6 +90,11 @@ public class DataCompressionHttp2Test {
private Http2ConnectionHandler clientHandler;
private ByteArrayOutputStream serverOut;

@BeforeAll
public static void beforeAllTests() throws Throwable {
Brotli.ensureAvailability();
}

@BeforeEach
public void setup() throws InterruptedException, Http2Exception {
MockitoAnnotations.initMocks(this);
Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Expand Up @@ -841,6 +841,11 @@
<artifactId>native-linux-aarch64</artifactId>
<version>${brotli4j.version}</version>
</dependency>
<dependency>
<groupId>com.aayushatharva.brotli4j</groupId>
<artifactId>native-linux-armv7</artifactId>
<version>${brotli4j.version}</version>
</dependency>
<dependency>
<groupId>com.aayushatharva.brotli4j</groupId>
<artifactId>native-osx-x86_64</artifactId>
Expand Down

0 comments on commit 0710751

Please sign in to comment.