Skip to content

Commit

Permalink
Disable pact tests when native tests are running
Browse files Browse the repository at this point in the history
  • Loading branch information
edeandrea committed Dec 12, 2024
1 parent d62e32f commit d3a769c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
17 changes: 17 additions & 0 deletions rest-fights/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,23 @@
<quarkus.native.enabled>true</quarkus.native.enabled>
<quarkus.package.jar.enabled>false</quarkus.package.jar.enabled>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
<pact_do_not_track>true</pact_do_not_track>
<pact.writer.overwrite>true</pact.writer.overwrite>
<quarkus.native.enabled>${quarkus.native.enabled}</quarkus.native.enabled>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>it-coverage</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import org.eclipse.microprofile.rest.client.inject.RestClient;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;

import io.quarkus.panache.mock.PanacheMock;
import io.quarkus.test.junit.QuarkusTest;
Expand Down Expand Up @@ -79,6 +80,7 @@
implementation = MockServerImplementation.Plugin,
registryEntry = "protobuf/transport/grpc"
)
@DisabledIfSystemProperty(named = "quarkus.native.enabled", matches = "true", disabledReason = "Not sure why, but when native profile is active some of these tests fail")
public class FightServiceConsumerContractTests extends FightServiceTestsBase {
private static final String VILLAIN_API_BASE_URI = "/api/villains";
private static final String VILLAIN_RANDOM_URI = VILLAIN_API_BASE_URI + "/random";
Expand Down Expand Up @@ -300,7 +302,6 @@ public V4Pact helloLocationsPact(PactBuilder builder) {
.toPact();
}

// Disable the location tests for now due to some flakiness that needs some investigation
@Pact(consumer = "rest-fights", provider = "grpc-locations")
public V4Pact randomLocationFoundPact(PactBuilder builder) {
return builder
Expand Down

0 comments on commit d3a769c

Please sign in to comment.