Skip to content

Commit

Permalink
Only enable test if brotli is there (netty#12592)
Browse files Browse the repository at this point in the history
Motiviation:

We should only try to run the test if Brotli is really supported on the platform (which is not the case on m1)

Modifications:

Only run if brotli is supported

Result:

Testsuite pass on m1
  • Loading branch information
normanmaurer committed Jul 11, 2022
1 parent 15812da commit 1befae8
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
package io.netty.handler.codec.http;

import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.handler.codec.compression.Brotli;
import io.netty.handler.codec.compression.StandardCompressionOptions;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIf;

import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.CoreMatchers.is;
Expand All @@ -28,8 +30,13 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

@EnabledIf("isBrotiAvailable")
class HttpContentCompressorOptionsTest {

static boolean isBrotiAvailable() {
return Brotli.isAvailable();
}

@Test
void testGetBrTargetContentEncoding() {
HttpContentCompressor compressor = new HttpContentCompressor(
Expand Down

0 comments on commit 1befae8

Please sign in to comment.