Skip to content

Commit

Permalink
Disabled Kudu itests as testcontainer is not able to bridge master an…
Browse files Browse the repository at this point in the history
…d tablet server container on some platforms/configurations fixes #1026
  • Loading branch information
aldettinger committed May 11, 2020
1 parent a76dc0d commit 4994632
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,22 @@
* {@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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@
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;
Expand All @@ -43,8 +41,7 @@
@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);
Expand Down

0 comments on commit 4994632

Please sign in to comment.