This is an automated email from the ASF dual-hosted git repository. aldettinger pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/master by this push: new 4994632 Disabled Kudu itests as testcontainer is not able to bridge master and tablet server container on some platforms/configurations fixes #1026 4994632 is described below commit 49946324d4c2864077d70564f8fb75d07dd4171b Author: aldettinger <aldettin...@gmail.com> AuthorDate: Mon May 11 12:28:12 2020 +0200 Disabled Kudu itests as testcontainer is not able to bridge master and tablet server container on some platforms/configurations fixes #1026 --- .../kudu/it/KuduInfrastructureTestHelper.java | 19 +++++++++---------- .../camel/quarkus/component/kudu/it/KuduIT.java | 5 ++--- .../camel/quarkus/component/kudu/it/KuduTest.java | 7 ++----- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/integration-tests/kudu/src/main/java/org/apache/camel/quarkus/component/kudu/it/KuduInfrastructureTestHelper.java b/integration-tests/kudu/src/main/java/org/apache/camel/quarkus/component/kudu/it/KuduInfrastructureTestHelper.java index 7ebaef0..95650a7 100644 --- a/integration-tests/kudu/src/main/java/org/apache/camel/quarkus/component/kudu/it/KuduInfrastructureTestHelper.java +++ b/integration-tests/kudu/src/main/java/org/apache/camel/quarkus/component/kudu/it/KuduInfrastructureTestHelper.java @@ -37,23 +37,22 @@ import org.jboss.logging.Logger; * {@code KuduTestResource}. * * A) How to run integration tests against a custom setup: - * Comment @EnabledIfSystemProperty annotations from {@code KuduTest} and {@code KuduIT}. + * Comment @Disabled and @DisabledOnNativeImage annotations from {@code KuduTest} and {@code KuduIT}. * Install Kudu master and tablet servers on the same network than integration tests. * Configure "camel.kudu.test.master.rpc-authority" in "application.properties", for instance: * camel.kudu.test.master.rpc-authority=kudu-master-hostname:7051 * Run integration tests with mvn clean integration-test -P native * - * B) How to run integration tests against the container based setup when NOT running on top of OpenJDK: - * Comment @EnabledIfSystemProperty annotations from {@code KuduTest} and {@code KuduIT}. - * Override the ip resolution of the host "kudu-tserver" to 127.0.0.1, e.g. by adding an entry in /etc/hosts file as - * below: + * B) How to run integration tests against the container based setup: + * Comment @Disabled and @DisabledOnNativeImage annotations from {@code KuduTest} and {@code KuduIT}. + * When NOT running on top of OpenJDK 9+, you'll need to manually override the ip resolution of the host "kudu-tserver" + * to 127.0.0.1, e.g. by adding an entry in /etc/hosts file as below: * 127.0.0.1 kudu-tserver * Run integration tests with mvn clean integration-test -P native - * - * C) How to run integration tests against the container based setup when running on top of OpenJDK 9 onward: - * No extra setup is needed as {@code overrideTabletServerHostnameResolution} takes care of redirecting - * the Kudu tablet server traffic toward localhost. - * Run integration tests with mvn clean integration-test -P native + * Note that under some platforms/configurations, testcontainers is not able to bridge master and tablet servers in a + * shared network. + * In such cases, a log like "0 tablet servers are alive" could be issued and falling back to a custom local setup is + * advised. */ @ApplicationScoped public class KuduInfrastructureTestHelper { diff --git a/integration-tests/kudu/src/test/java/org/apache/camel/quarkus/component/kudu/it/KuduIT.java b/integration-tests/kudu/src/test/java/org/apache/camel/quarkus/component/kudu/it/KuduIT.java index 8bf9fad..8f5be00 100644 --- a/integration-tests/kudu/src/test/java/org/apache/camel/quarkus/component/kudu/it/KuduIT.java +++ b/integration-tests/kudu/src/test/java/org/apache/camel/quarkus/component/kudu/it/KuduIT.java @@ -16,14 +16,13 @@ */ package org.apache.camel.quarkus.component.kudu.it; +import io.quarkus.test.junit.DisabledOnNativeImage; import io.quarkus.test.junit.NativeImageTest; -import org.junit.jupiter.api.condition.DisabledOnJre; import org.junit.jupiter.api.condition.EnabledIfSystemProperty; -import org.junit.jupiter.api.condition.JRE; @NativeImageTest @EnabledIfSystemProperty(named = "java.runtime.name", matches = ".*OpenJDK.*") -@DisabledOnJre(JRE.JAVA_8) +@DisabledOnNativeImage class KuduIT extends KuduTest { } diff --git a/integration-tests/kudu/src/test/java/org/apache/camel/quarkus/component/kudu/it/KuduTest.java b/integration-tests/kudu/src/test/java/org/apache/camel/quarkus/component/kudu/it/KuduTest.java index 068d39a..18dc9a8 100644 --- a/integration-tests/kudu/src/test/java/org/apache/camel/quarkus/component/kudu/it/KuduTest.java +++ b/integration-tests/kudu/src/test/java/org/apache/camel/quarkus/component/kudu/it/KuduTest.java @@ -28,13 +28,11 @@ import org.apache.kudu.client.KuduException; import org.eclipse.microprofile.config.ConfigProvider; import org.jboss.logging.Logger; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.MethodOrderer.OrderAnnotation; import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestMethodOrder; -import org.junit.jupiter.api.condition.DisabledOnJre; -import org.junit.jupiter.api.condition.EnabledIfSystemProperty; -import org.junit.jupiter.api.condition.JRE; import static org.apache.camel.quarkus.component.kudu.it.KuduInfrastructureTestHelper.KUDU_AUTHORITY_CONFIG_KEY; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -43,8 +41,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; @QuarkusTestResource(KuduTestResource.class) @QuarkusTest @TestMethodOrder(OrderAnnotation.class) -@EnabledIfSystemProperty(named = "java.runtime.name", matches = ".*OpenJDK.*") -@DisabledOnJre(JRE.JAVA_8) +@Disabled class KuduTest { private static final Logger LOG = Logger.getLogger(KuduTest.class);