Skip to content

Commit

Permalink
Work around SunEC warning
Browse files Browse the repository at this point in the history
  • Loading branch information
CSTDev committed Nov 15, 2019
1 parent c2afb43 commit 4aa4e70
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
import static io.restassured.RestAssured.given;
import static org.hamcrest.Matchers.containsString;

import java.security.Provider;
import java.security.Security;

import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import io.quarkus.test.junit.NativeImageTest;
Expand All @@ -12,6 +17,20 @@
@NativeImageTest
public class VertxProducerResourceIT extends VertxProducerResourceTest {

private static Provider sunECProvider;

@BeforeAll
public static void setupSecProvider() {
//Remove SunEC provider for the test as it's not being provided for tests.
sunECProvider = Security.getProvider("SunEC");
Security.removeProvider("SunEC");
}

@AfterAll
public static void restoreSecProvider() {
Security.addProvider(sunECProvider);
}

@Test
public void testRouteRegistrationMTLS() {
RequestSpecification spec = new RequestSpecBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import io.quarkus.test.common.http.TestHTTPResource;
import io.quarkus.test.junit.DisabledOnNativeImage;
import io.quarkus.test.junit.QuarkusTest;

import io.restassured.builder.RequestSpecBuilder;
import io.restassured.specification.RequestSpecification;

Expand Down

0 comments on commit 4aa4e70

Please sign in to comment.