You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2021/09/06 13:04:26 UTC
[skywalking] branch master updated: Remove docker-maven-plugin in
favor of testcontainers (#7664)
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new 327d946 Remove docker-maven-plugin in favor of testcontainers (#7664)
327d946 is described below
commit 327d9469787ccc080fb8284dc7a5609a4a19c8bc
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Mon Sep 6 21:04:14 2021 +0800
Remove docker-maven-plugin in favor of testcontainers (#7664)
---
dist-material/release-docs/LICENSE | 2 +-
oap-server/pom.xml | 5 +-
.../cluster-consul-plugin/pom.xml | 100 ------------
...TClusterModuleConsulProviderFunctionalTest.java | 15 +-
.../cluster-etcd-plugin/pom.xml | 5 -
.../cluster-nacos-plugin/pom.xml | 9 --
...ITClusterModuleNacosProviderFunctionalTest.java | 4 -
.../cluster-zookeeper-plugin/pom.xml | 101 +------------
...usterModuleZookeeperProviderFunctionalTest.java | 17 ++-
.../configuration-apollo/pom.xml | 114 --------------
.../apollo/ITApolloConfigurationTest.java | 168 ---------------------
.../configuration-consul/pom.xml | 97 +-----------
.../consul/ITConsulConfigurationTest.java | 11 ++
.../configuration-etcd/pom.xml | 5 -
.../configuration-nacos/pom.xml | 103 -------------
.../nacos/ITNacosConfigurationTest.java | 14 ++
.../configuration-zookeeper/pom.xml | 93 ------------
.../zookeeper/it/ITZookeeperConfigurationTest.java | 20 ++-
.../library-elasticsearch-client/pom.xml | 6 -
pom.xml | 8 -
.../known-oap-backend-dependencies.txt | 2 +-
21 files changed, 71 insertions(+), 828 deletions(-)
diff --git a/dist-material/release-docs/LICENSE b/dist-material/release-docs/LICENSE
index 90bb100..e510bfb 100755
--- a/dist-material/release-docs/LICENSE
+++ b/dist-material/release-docs/LICENSE
@@ -255,7 +255,7 @@ The text of each license is the standard Apache 2.0 license.
Apache: commons-collections 3.2.2: https://github.com/apache/commons-collections, Apache 2.0
Apache: commons-configuration 1.8: https://github.com/apache/commons-configuration, Apache 2.0
Apache: commons-io 2.4: https://github.com/apache/commons-io, Apache 2.0
- Apache: commons-compress 1.21: https://github.com/apache/commons-compress, Apache 2.0
+ Apache: commons-compress 1.20: https://github.com/apache/commons-compress, Apache 2.0
Apache: commons-collections4 4.4: https://mvnrepository.com/artifact/org.apache.commons/commons-collections4, Apache 2.0
Apache: freemarker 2.3.28: https://github.com/apache/freemarker, Apache 2.0
netty 4.1.65: https://github.com/netty/netty/blob/4.1/LICENSE.txt, Apache 2.0
diff --git a/oap-server/pom.xml b/oap-server/pom.xml
index 4d464a8..de876dd 100755
--- a/oap-server/pom.xml
+++ b/oap-server/pom.xml
@@ -52,7 +52,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven-docker-plugin.version>0.30.0</maven-docker-plugin.version>
- <zookeeper.image.version>3.5</zookeeper.image.version>
<kafka-clients.version>2.4.1</kafka-clients.version>
<spring-kafka-test.version>2.4.6.RELEASE</spring-kafka-test.version>
</properties>
@@ -84,6 +83,10 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.testcontainers</groupId>
+ <artifactId>testcontainers</artifactId>
+ </dependency>
</dependencies>
<dependencyManagement>
diff --git a/oap-server/server-cluster-plugin/cluster-consul-plugin/pom.xml b/oap-server/server-cluster-plugin/cluster-consul-plugin/pom.xml
index 0d3ef0b..db2c140 100644
--- a/oap-server/server-cluster-plugin/cluster-consul-plugin/pom.xml
+++ b/oap-server/server-cluster-plugin/cluster-consul-plugin/pom.xml
@@ -28,10 +28,6 @@
<artifactId>cluster-consul-plugin</artifactId>
<packaging>jar</packaging>
- <properties>
- <consul.image.version>0.9</consul.image.version>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.apache.skywalking</groupId>
@@ -54,100 +50,4 @@
</exclusions>
</dependency>
</dependencies>
-
- <profiles>
- <profile>
- <id>CI-with-IT</id>
- <build>
- <plugins>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <configuration>
- <sourceMode>all</sourceMode>
- <logDate>default</logDate>
- <verbose>true</verbose>
- <showLogs>true</showLogs>
- <imagePullPolicy>IfNotPresent</imagePullPolicy>
- </configuration>
- <executions>
- <execution>
- <id>prepare-consul</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- <configuration>
- <images>
- <image>
- <name>consul:${consul.image.version}</name>
- <alias>cluster-consul-plugin-integration-test-cluster</alias>
- <run>
- <cmd>agent -server -bootstrap-expect=1 -client=0.0.0.0</cmd>
- <ports>
- <port>consul.port:8500</port>
- </ports>
- <wait>
- <log>Synced node info</log>
- <time>30000</time>
- </wait>
- </run>
- </image>
- </images>
- </configuration>
- </execution>
- <execution>
- <id>prepare-consul-stop</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.gmaven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <version>${gmaven-plugin.version}</version>
- <executions>
- <execution>
- <id>add-default-properties</id>
- <phase>initialize</phase>
- <goals>
- <goal>execute</goal>
- </goals>
- <configuration>
- <providerSelection>2.0</providerSelection>
- <source>
- project.properties.setProperty('docker.hostname', 'localhost')
-
- log.info("Docker hostname is " + project.properties['docker.hostname'])
- </source>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <configuration>
- <systemPropertyVariables>
- <consul.address>
- ${docker.hostname}:${consul.port}
- </consul.address>
- </systemPropertyVariables>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>integration-test</goal>
- <goal>verify</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
diff --git a/oap-server/server-cluster-plugin/cluster-consul-plugin/src/test/java/org/apache/skywalking/oap/server/cluster/plugin/consul/ITClusterModuleConsulProviderFunctionalTest.java b/oap-server/server-cluster-plugin/cluster-consul-plugin/src/test/java/org/apache/skywalking/oap/server/cluster/plugin/consul/ITClusterModuleConsulProviderFunctionalTest.java
index 94963b9..757ead4 100644
--- a/oap-server/server-cluster-plugin/cluster-consul-plugin/src/test/java/org/apache/skywalking/oap/server/cluster/plugin/consul/ITClusterModuleConsulProviderFunctionalTest.java
+++ b/oap-server/server-cluster-plugin/cluster-consul-plugin/src/test/java/org/apache/skywalking/oap/server/cluster/plugin/consul/ITClusterModuleConsulProviderFunctionalTest.java
@@ -37,6 +37,7 @@ import org.apache.skywalking.oap.server.telemetry.api.MetricsCreator;
import org.apache.skywalking.oap.server.telemetry.none.MetricsCreatorNoop;
import org.apache.skywalking.oap.server.telemetry.none.NoneTelemetryProvider;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -44,6 +45,9 @@ import org.mockito.Mockito;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.modules.junit4.PowerMockRunner;
import org.powermock.reflect.Whitebox;
+import org.testcontainers.containers.GenericContainer;
+import org.testcontainers.containers.wait.strategy.Wait;
+import org.testcontainers.utility.DockerImageName;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -55,6 +59,12 @@ public class ITClusterModuleConsulProviderFunctionalTest {
private String consulAddress;
+ @Rule
+ public final GenericContainer<?> container =
+ new GenericContainer<>(DockerImageName.parse("consul:0.9"))
+ .waitingFor(Wait.forLogMessage(".*Synced node info.*", 1))
+ .withCommand("agent", "-server", "-bootstrap-expect=1", "-client=0.0.0.0");
+
@Mock
private ModuleManager moduleManager;
@Mock
@@ -67,8 +77,7 @@ public class ITClusterModuleConsulProviderFunctionalTest {
TelemetryModule telemetryModule = Mockito.spy(TelemetryModule.class);
Whitebox.setInternalState(telemetryModule, "loadedProvider", telemetryProvider);
Mockito.when(moduleManager.find(TelemetryModule.NAME)).thenReturn(telemetryModule);
- consulAddress = System.getProperty("consul.address");
- assertFalse(StringUtil.isEmpty(consulAddress));
+ consulAddress = container.getHost() + ":" + container.getMappedPort(8500);
}
@Test
@@ -258,7 +267,7 @@ public class ITClusterModuleConsulProviderFunctionalTest {
}
}
while (--cyclic > 0);
- return Collections.EMPTY_LIST;
+ return Collections.emptyList();
}
private void validateServiceInstance(Address selfAddress, Address otherAddress, List<RemoteInstance> queryResult) {
diff --git a/oap-server/server-cluster-plugin/cluster-etcd-plugin/pom.xml b/oap-server/server-cluster-plugin/cluster-etcd-plugin/pom.xml
index e46c021..79af228 100644
--- a/oap-server/server-cluster-plugin/cluster-etcd-plugin/pom.xml
+++ b/oap-server/server-cluster-plugin/cluster-etcd-plugin/pom.xml
@@ -80,10 +80,5 @@
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</dependency>
-
- <dependency>
- <groupId>org.testcontainers</groupId>
- <artifactId>testcontainers</artifactId>
- </dependency>
</dependencies>
</project>
diff --git a/oap-server/server-cluster-plugin/cluster-nacos-plugin/pom.xml b/oap-server/server-cluster-plugin/cluster-nacos-plugin/pom.xml
index ce47c3a..eb86d88 100644
--- a/oap-server/server-cluster-plugin/cluster-nacos-plugin/pom.xml
+++ b/oap-server/server-cluster-plugin/cluster-nacos-plugin/pom.xml
@@ -26,10 +26,6 @@
<artifactId>cluster-nacos-plugin</artifactId>
- <properties>
- <test.nacos.version>1.4.2</test.nacos.version>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.apache.skywalking</groupId>
@@ -71,10 +67,5 @@
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore-nio</artifactId>
</dependency>
-
- <dependency>
- <groupId>org.testcontainers</groupId>
- <artifactId>testcontainers</artifactId>
- </dependency>
</dependencies>
</project>
diff --git a/oap-server/server-cluster-plugin/cluster-nacos-plugin/src/test/java/org/apache/skywalking/oap/server/cluster/plugin/nacos/ITClusterModuleNacosProviderFunctionalTest.java b/oap-server/server-cluster-plugin/cluster-nacos-plugin/src/test/java/org/apache/skywalking/oap/server/cluster/plugin/nacos/ITClusterModuleNacosProviderFunctionalTest.java
index 774793b..baaeafa 100644
--- a/oap-server/server-cluster-plugin/cluster-nacos-plugin/src/test/java/org/apache/skywalking/oap/server/cluster/plugin/nacos/ITClusterModuleNacosProviderFunctionalTest.java
+++ b/oap-server/server-cluster-plugin/cluster-nacos-plugin/src/test/java/org/apache/skywalking/oap/server/cluster/plugin/nacos/ITClusterModuleNacosProviderFunctionalTest.java
@@ -37,12 +37,10 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.junit.runners.BlockJUnit4ClassRunner;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.modules.junit4.PowerMockRunner;
-import org.powermock.modules.junit4.PowerMockRunnerDelegate;
import org.powermock.reflect.Whitebox;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.wait.strategy.Wait;
@@ -53,8 +51,6 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@RunWith(PowerMockRunner.class)
-// ClassRule is not applied in PowerMockRunner
-@PowerMockRunnerDelegate(BlockJUnit4ClassRunner.class)
@PowerMockIgnore({"javax.security.*", "javax.net.ssl.*", "javax.management.*"})
public class ITClusterModuleNacosProviderFunctionalTest {
diff --git a/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/pom.xml b/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/pom.xml
index 2f4fbe8..54b32ab 100644
--- a/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/pom.xml
+++ b/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/pom.xml
@@ -28,10 +28,6 @@
<artifactId>cluster-zookeeper-plugin</artifactId>
<packaging>jar</packaging>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.apache.skywalking</groupId>
@@ -51,99 +47,4 @@
<artifactId>curator-test</artifactId>
</dependency>
</dependencies>
-
- <profiles>
- <profile>
- <id>CI-with-IT</id>
- <build>
- <plugins>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <configuration>
- <sourceMode>all</sourceMode>
- <logDate>default</logDate>
- <verbose>true</verbose>
- <showLogs>true</showLogs>
- <imagePullPolicy>IfNotPresent</imagePullPolicy>
- </configuration>
- <executions>
- <execution>
- <id>prepare-zookeeper</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- <configuration>
- <images>
- <image>
- <name>zookeeper:${zookeeper.image.version}</name>
- <alias>cluster-zookeeper-plugin-integration-test-zookeeper</alias>
- <run>
- <ports>
- <port>zk-port:2181</port>
- </ports>
- <wait>
- <log>binding to port</log>
- <time>30000</time>
- </wait>
- </run>
- </image>
- </images>
- </configuration>
- </execution>
- <execution>
- <id>prepare-zookeeper-start</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.gmaven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <version>${gmaven-plugin.version}</version>
- <executions>
- <execution>
- <id>add-default-properties</id>
- <phase>initialize</phase>
- <goals>
- <goal>execute</goal>
- </goals>
- <configuration>
- <providerSelection>2.0</providerSelection>
- <source>
- project.properties.setProperty('docker.hostname', 'localhost')
-
- log.info("Docker hostname is " + project.properties['docker.hostname'])
- </source>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <configuration>
- <systemPropertyVariables>
- <zk.address>
- ${docker.hostname}:${zk-port}
- </zk.address>
- </systemPropertyVariables>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>integration-test</goal>
- <goal>verify</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
\ No newline at end of file
+</project>
diff --git a/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/src/test/java/org/apache/skywalking/oap/server/cluster/plugin/zookeeper/ITClusterModuleZookeeperProviderFunctionalTest.java b/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/src/test/java/org/apache/skywalking/oap/server/cluster/plugin/zookeeper/ITClusterModuleZookeeperProviderFunctionalTest.java
index ad1e22e..1d38a25 100644
--- a/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/src/test/java/org/apache/skywalking/oap/server/cluster/plugin/zookeeper/ITClusterModuleZookeeperProviderFunctionalTest.java
+++ b/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/src/test/java/org/apache/skywalking/oap/server/cluster/plugin/zookeeper/ITClusterModuleZookeeperProviderFunctionalTest.java
@@ -20,7 +20,6 @@ package org.apache.skywalking.oap.server.cluster.plugin.zookeeper;
import java.util.Collections;
import java.util.List;
-
import org.apache.curator.x.discovery.ServiceDiscovery;
import org.apache.skywalking.apm.util.StringUtil;
import org.apache.skywalking.oap.server.core.cluster.ClusterNodesQuery;
@@ -34,6 +33,7 @@ import org.apache.skywalking.oap.server.telemetry.api.MetricsCreator;
import org.apache.skywalking.oap.server.telemetry.none.MetricsCreatorNoop;
import org.apache.skywalking.oap.server.telemetry.none.NoneTelemetryProvider;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -41,17 +41,25 @@ import org.mockito.Mockito;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.modules.junit4.PowerMockRunner;
import org.powermock.reflect.Whitebox;
+import org.testcontainers.containers.GenericContainer;
+import org.testcontainers.containers.wait.strategy.Wait;
+import org.testcontainers.utility.DockerImageName;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@RunWith(PowerMockRunner.class)
-@PowerMockIgnore({"javax.security.*", "com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*", "org.w3c.*"})
+@PowerMockIgnore({"javax.net.ssl.*", "javax.security.*", "com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*", "org.w3c.*"})
public class ITClusterModuleZookeeperProviderFunctionalTest {
private String zkAddress;
+ @Rule
+ public final GenericContainer<?> container =
+ new GenericContainer<>(DockerImageName.parse("zookeeper:3.5"))
+ .waitingFor(Wait.forLogMessage(".*binding to port.*", 1));
+
@Mock
private ModuleManager moduleManager;
@Mock
@@ -64,8 +72,7 @@ public class ITClusterModuleZookeeperProviderFunctionalTest {
TelemetryModule telemetryModule = Mockito.spy(TelemetryModule.class);
Whitebox.setInternalState(telemetryModule, "loadedProvider", telemetryProvider);
Mockito.when(moduleManager.find(TelemetryModule.NAME)).thenReturn(telemetryModule);
- zkAddress = System.getProperty("zk.address");
- assertFalse(StringUtil.isEmpty(zkAddress));
+ zkAddress = container.getHost() + ":" + container.getMappedPort(2181);
}
@Test
@@ -233,7 +240,7 @@ public class ITClusterModuleZookeeperProviderFunctionalTest {
}
}
while (--cyclic > 0);
- return Collections.EMPTY_LIST;
+ return Collections.emptyList();
}
private void validateServiceInstance(Address selfAddress, Address otherAddress, List<RemoteInstance> queryResult) {
diff --git a/oap-server/server-configuration/configuration-apollo/pom.xml b/oap-server/server-configuration/configuration-apollo/pom.xml
index 9b4439f..ddb243a 100644
--- a/oap-server/server-configuration/configuration-apollo/pom.xml
+++ b/oap-server/server-configuration/configuration-apollo/pom.xml
@@ -60,118 +60,4 @@
<scope>test</scope>
</dependency>
</dependencies>
-
- <profiles>
- <profile>
- <id>CI-with-IT</id>
- <build>
- <plugins>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <configuration>
- <sourceMode>all</sourceMode>
- <showLogs>true</showLogs>
- <logDate>default</logDate>
- <verbose>true</verbose>
- <imagePullPolicy>IfNotPresent</imagePullPolicy>
- <skip>true</skip>
- <images>
- <image>
- <name>mysql:5.7</name>
- <alias>apollo-db</alias>
- <run>
- <env>
- <TZ>Asia/Shanghai</TZ>
- <MYSQL_ALLOW_EMPTY_PASSWORD>yes</MYSQL_ALLOW_EMPTY_PASSWORD>
- </env>
- <namingStrategy>none</namingStrategy>
- <volumes>
- <bind>
- <volume>
- src/test/resources/docker/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- </volume>
- </bind>
- </volumes>
- <wait>
- <log>ready for connections</log>
- <time>600000</time>
- </wait>
- </run>
- </image>
- <image>
- <name>kezhenxu94/apollo:1.2</name>
- <alias>apollo-config-and-portal</alias>
- <run>
- <namingStrategy>none</namingStrategy>
- <dependsOn>
- <container>apollo-db</container>
- </dependsOn>
- <links>
- <link>apollo-db</link>
- </links>
- <ports>
- <port>+apollo.portal.host:apollo.portal.port:8070</port>
- <port>+apollo.meta.host:apollo.meta.port:8080</port>
- </ports>
- <wait>
- <log>Portal started. You can visit</log>
- <time>2400000</time>
- </wait>
- </run>
- </image>
- </images>
- </configuration>
- <executions>
- <execution>
- <id>start</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- </execution>
- <execution>
- <id>stop</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <configuration>
- <systemPropertyVariables>
- <apollo.portal.host>
- ${apollo.portal.host}
- </apollo.portal.host>
- <apollo.portal.port>
- ${apollo.portal.port}
- </apollo.portal.port>
- <apollo.meta.host>
- ${apollo.meta.host}
- </apollo.meta.host>
- <apollo.meta.port>
- ${apollo.meta.port}
- </apollo.meta.port>
- <apollo.configService>
- http://${apollo.meta.host}:${apollo.meta.port}
- </apollo.configService>
- </systemPropertyVariables>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>integration-test</goal>
- <goal>verify</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
diff --git a/oap-server/server-configuration/configuration-apollo/src/test/java/org/apache/skywalking/oap/server/configuration/apollo/ITApolloConfigurationTest.java b/oap-server/server-configuration/configuration-apollo/src/test/java/org/apache/skywalking/oap/server/configuration/apollo/ITApolloConfigurationTest.java
deleted file mode 100644
index 8ed81cd..0000000
--- a/oap-server/server-configuration/configuration-apollo/src/test/java/org/apache/skywalking/oap/server/configuration/apollo/ITApolloConfigurationTest.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.skywalking.oap.server.configuration.apollo;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.Reader;
-import java.util.Map;
-import java.util.Properties;
-import org.apache.http.client.ResponseHandler;
-import org.apache.http.client.methods.HttpDelete;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.BasicResponseHandler;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.skywalking.apm.util.PropertyPlaceholderHelper;
-import org.apache.skywalking.oap.server.library.module.ApplicationConfiguration;
-import org.apache.skywalking.oap.server.library.module.ModuleManager;
-import org.apache.skywalking.oap.server.library.util.CollectionUtils;
-import org.apache.skywalking.oap.server.library.util.ResourceUtils;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.yaml.snakeyaml.Yaml;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
-
-public class ITApolloConfigurationTest {
- private static final Logger LOGGER = LoggerFactory.getLogger(ITApolloConfigurationTest.class);
-
- private final Yaml yaml = new Yaml();
- private final String token = "f71f002a4ff9845639ef655ee7019759e31449de";
- private final CloseableHttpClient httpClient = HttpClients.createDefault();
- private final ResponseHandler responseHandler = new BasicResponseHandler();
-
- private String baseUrl;
- private ApolloConfigurationTestProvider provider;
-
- @Before
- public void setUp() throws Exception {
- String host = System.getProperty("apollo.portal.host");
- String port = System.getProperty("apollo.portal.port");
-
- baseUrl = "http://" + host + ":" + port;
- LOGGER.info("baseUrl: {}", baseUrl);
-
- final ApplicationConfiguration applicationConfiguration = new ApplicationConfiguration();
- loadConfig(applicationConfiguration);
-
- final ModuleManager moduleManager = new ModuleManager();
- moduleManager.init(applicationConfiguration);
-
- provider = (ApolloConfigurationTestProvider) moduleManager.find(ApolloConfigurationTestModule.NAME).provider();
-
- assertNotNull(provider);
- }
-
- @SuppressWarnings("StatementWithEmptyBody")
- @Ignore // due to instability
- @Test(timeout = 10000)
- public void shouldReadUpdated() {
- try {
- assertNull(provider.watcher.value());
-
- final HttpPost createConfigPost = new HttpPost(baseUrl + "/openapi/v1/envs/DEV" + "/apps/SampleApp" + "/clusters/default" + "/namespaces/application" + "/items");
- createConfigPost.setHeader("Authorization", token);
- createConfigPost.setHeader("Content-Type", "application/json;charset=UTF-8");
- final StringEntity entity = new StringEntity("{\n" + " \"key\":\"test-module.default.testKey\",\n" + " \"value\":\"3000\",\n" + " \"comment\":\"test key\",\n" + " \"dataChangeCreatedBy\":\"apollo\"\n" + "}");
- createConfigPost.setEntity(entity);
- final String createResponse = (String) httpClient.execute(createConfigPost, responseHandler);
- LOGGER.info("createResponse: {}", createResponse);
-
- final HttpPost releaseConfigRequest = new HttpPost(baseUrl + "/openapi/v1/envs/DEV" + "/apps/SampleApp" + "/clusters/default" + "/namespaces/application/releases");
- releaseConfigRequest.setEntity(new StringEntity("{\n" + " \"releaseTitle\":\"2019-06-07\",\n" + " \"releaseComment\":\"test\",\n" + " \"releasedBy\":\"apollo\"\n" + "}"));
- releaseConfigRequest.setHeader("Authorization", token);
- releaseConfigRequest.setHeader("Content-Type", "application/json;charset=UTF-8");
- final String releaseCreateResponse = (String) httpClient.execute(releaseConfigRequest, responseHandler);
- LOGGER.info("releaseCreateResponse: {}", releaseCreateResponse);
-
- for (String v = provider.watcher.value(); v == null; v = provider.watcher.value()) {
- }
-
- assertEquals("3000", provider.watcher.value());
-
- final HttpDelete deleteConfigRequest = new HttpDelete(baseUrl + "/openapi/v1" + "/envs/DEV" + "/apps/SampleApp" + "/clusters/default" + "/namespaces/application" + "/items/test-module.default.testKey" + "?operator=apollo");
- deleteConfigRequest.setHeader("Authorization", token);
- deleteConfigRequest.setHeader("Content-Type", "application/json;charset=UTF-8");
- httpClient.execute(deleteConfigRequest);
- final String releaseDeleteResponse = (String) httpClient.execute(releaseConfigRequest, responseHandler);
- LOGGER.info("releaseDeleteResponse: {}", releaseDeleteResponse);
-
- for (String v = provider.watcher.value(); v != null; v = provider.watcher.value()) {
- }
-
- assertNull(provider.watcher.value());
- } catch (IOException e) {
- LOGGER.error(e.getMessage(), e);
- fail(e.getMessage());
- }
- }
-
- @SuppressWarnings("unchecked")
- private void loadConfig(ApplicationConfiguration configuration) throws FileNotFoundException {
- Reader applicationReader = ResourceUtils.read("application.yml");
- Map<String, Map<String, Map<String, ?>>> moduleConfig = yaml.loadAs(applicationReader, Map.class);
- if (CollectionUtils.isNotEmpty(moduleConfig)) {
- moduleConfig.forEach((moduleName, providerConfig) -> {
- if (providerConfig.size() > 0) {
- ApplicationConfiguration.ModuleConfiguration moduleConfiguration = configuration.addModule(moduleName);
- providerConfig.forEach((name, propertiesConfig) -> {
- Properties properties = new Properties();
- if (propertiesConfig != null) {
- propertiesConfig.forEach((key, value) -> {
- properties.put(key, value);
- final Object replaceValue = yaml.load(PropertyPlaceholderHelper.INSTANCE.replacePlaceholders(value + "", properties));
- if (replaceValue != null) {
- properties.replace(key, replaceValue);
- }
- });
- }
- moduleConfiguration.addProviderConfiguration(name, properties);
- });
- }
- });
- }
- }
-
- @After
- public void cleanUp() throws IOException {
- try {
- final HttpDelete deleteConfigRequest = new HttpDelete(baseUrl + "/openapi/v1" + "/envs/DEV" + "/apps/SampleApp" + "/clusters/default" + "/namespaces/application" + "/items/test-module.default.testKey" + "?operator=apollo");
- deleteConfigRequest.setHeader("Authorization", token);
- deleteConfigRequest.setHeader("Content-Type", "application/json;charset=UTF-8");
- httpClient.execute(deleteConfigRequest);
-
- final HttpPost releaseConfigRequest = new HttpPost(baseUrl + "/openapi/v1/envs/DEV" + "/apps/SampleApp" + "/clusters/default" + "/namespaces/application/releases");
- releaseConfigRequest.setEntity(new StringEntity("{\n" + " \"releaseTitle\":\"2019-06-07\",\n" + " \"releaseComment\":\"test\",\n" + " \"releasedBy\":\"apollo\"\n" + "}"));
- releaseConfigRequest.setHeader("Authorization", token);
- releaseConfigRequest.setHeader("Content-Type", "application/json;charset=UTF-8");
- httpClient.execute(releaseConfigRequest, responseHandler);
- } catch (Exception e) {
- LOGGER.error(e.getMessage(), e);
- }
- }
-}
diff --git a/oap-server/server-configuration/configuration-consul/pom.xml b/oap-server/server-configuration/configuration-consul/pom.xml
index ed7fac8..164237a 100644
--- a/oap-server/server-configuration/configuration-consul/pom.xml
+++ b/oap-server/server-configuration/configuration-consul/pom.xml
@@ -30,7 +30,6 @@
<properties>
<consul.client.version>1.2.6</consul.client.version>
- <consul.image.version>0.9</consul.image.version>
</properties>
<dependencies>
@@ -62,98 +61,4 @@
</exclusions>
</dependency>
</dependencies>
-
- <profiles>
- <profile>
- <id>CI-with-IT</id>
- <build>
- <plugins>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <configuration>
- <sourceMode>all</sourceMode>
- <showLogs>true</showLogs>
- <logDate>default</logDate>
- <verbose>true</verbose>
- <imagePullPolicy>IfNotPresent</imagePullPolicy>
- <images>
- <image>
- <name>consul:${consul.image.version}</name>
- <alias>cluster-consul-plugin-integration-test-cluster</alias>
- <run>
- <cmd>agent -server -bootstrap-expect=1 -client=0.0.0.0</cmd>
- <ports>
- <port>consul.port:8500</port>
- </ports>
- <wait>
- <log>Synced node info</log>
- <time>30000</time>
- </wait>
- </run>
- </image>
- </images>
- </configuration>
- <executions>
- <execution>
- <id>start</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- </execution>
- <execution>
- <id>stop</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.gmaven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <version>${gmaven-plugin.version}</version>
- <executions>
- <execution>
- <id>add-default-properties</id>
- <phase>initialize</phase>
- <goals>
- <goal>execute</goal>
- </goals>
- <configuration>
- <providerSelection>2.0</providerSelection>
- <source>
- project.properties.setProperty('docker.hostname', 'localhost')
-
- log.info("Docker hostname is " + project.properties['docker.hostname'])
- </source>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <configuration>
- <systemPropertyVariables>
- <consul.address>
- ${docker.hostname}:${consul.port}
- </consul.address>
- </systemPropertyVariables>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>integration-test</goal>
- <goal>verify</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
\ No newline at end of file
+</project>
diff --git a/oap-server/server-configuration/configuration-consul/src/test/java/org/apache/skywalking/oap/server/configuration/consul/ITConsulConfigurationTest.java b/oap-server/server-configuration/configuration-consul/src/test/java/org/apache/skywalking/oap/server/configuration/consul/ITConsulConfigurationTest.java
index 335bc04..ede4be3 100644
--- a/oap-server/server-configuration/configuration-consul/src/test/java/org/apache/skywalking/oap/server/configuration/consul/ITConsulConfigurationTest.java
+++ b/oap-server/server-configuration/configuration-consul/src/test/java/org/apache/skywalking/oap/server/configuration/consul/ITConsulConfigurationTest.java
@@ -31,7 +31,11 @@ import org.apache.skywalking.oap.server.library.module.ModuleManager;
import org.apache.skywalking.oap.server.library.util.CollectionUtils;
import org.apache.skywalking.oap.server.library.util.ResourceUtils;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
+import org.testcontainers.containers.GenericContainer;
+import org.testcontainers.containers.wait.strategy.Wait;
+import org.testcontainers.utility.DockerImageName;
import org.yaml.snakeyaml.Yaml;
import static org.junit.Assert.assertEquals;
@@ -44,8 +48,15 @@ public class ITConsulConfigurationTest {
private ConsulConfigurationTestProvider provider;
+ @Rule
+ public final GenericContainer<?> container =
+ new GenericContainer<>(DockerImageName.parse("consul:0.9"))
+ .waitingFor(Wait.forLogMessage(".*Synced node info.*", 1))
+ .withCommand("agent", "-server", "-bootstrap-expect=1", "-client=0.0.0.0");
+
@Before
public void setUp() throws Exception {
+ System.setProperty("consul.address", container.getHost() + ":" + container.getMappedPort(8500));
final ApplicationConfiguration applicationConfiguration = new ApplicationConfiguration();
loadConfig(applicationConfiguration);
diff --git a/oap-server/server-configuration/configuration-etcd/pom.xml b/oap-server/server-configuration/configuration-etcd/pom.xml
index dc00ee0..051c2e1 100644
--- a/oap-server/server-configuration/configuration-etcd/pom.xml
+++ b/oap-server/server-configuration/configuration-etcd/pom.xml
@@ -77,11 +77,6 @@
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</dependency>
-
- <dependency>
- <groupId>org.testcontainers</groupId>
- <artifactId>testcontainers</artifactId>
- </dependency>
</dependencies>
<build>
diff --git a/oap-server/server-configuration/configuration-nacos/pom.xml b/oap-server/server-configuration/configuration-nacos/pom.xml
index e4a454c..846367a 100644
--- a/oap-server/server-configuration/configuration-nacos/pom.xml
+++ b/oap-server/server-configuration/configuration-nacos/pom.xml
@@ -27,10 +27,6 @@
<artifactId>configuration-nacos</artifactId>
- <properties>
- <test.nacos.version>1.4.2</test.nacos.version>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.apache.skywalking</groupId>
@@ -47,103 +43,4 @@
<artifactId>nacos-client</artifactId>
</dependency>
</dependencies>
-
- <profiles>
- <profile>
- <id>CI-with-IT</id>
- <build>
- <plugins>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <configuration>
- <sourceMode>all</sourceMode>
- <showLogs>true</showLogs>
- <logDate>default</logDate>
- <verbose>true</verbose>
- <imagePullPolicy>IfNotPresent</imagePullPolicy>
- <images>
- <image>
- <name>nacos/nacos-server:${test.nacos.version}</name>
- <alias>nacos-dynamic-configuration-integration-test-nacos</alias>
- <run>
- <env>
- <MODE>standalone</MODE>
- </env>
- <ports>
- <port>nacos.port:8848</port>
- </ports>
- <wait>
- <log>Nacos started successfully</log>
- <time>120000</time>
- </wait>
- </run>
- </image>
- </images>
- </configuration>
- <executions>
- <execution>
- <id>start</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- </execution>
- <execution>
- <id>stop</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.gmaven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <version>${gmaven-plugin.version}</version>
- <executions>
- <execution>
- <id>add-default-properties</id>
- <phase>initialize</phase>
- <goals>
- <goal>execute</goal>
- </goals>
- <configuration>
- <providerSelection>2.0</providerSelection>
- <source>
- project.properties.setProperty('docker.hostname', 'localhost')
-
- log.info("Docker hostname is " + project.properties['docker.hostname'])
- </source>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <configuration>
- <systemPropertyVariables>
- <nacos.host>
- ${docker.hostname}
- </nacos.host>
- <nacos.port>
- ${nacos.port}
- </nacos.port>
- </systemPropertyVariables>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>integration-test</goal>
- <goal>verify</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
diff --git a/oap-server/server-configuration/configuration-nacos/src/test/java/org/apache/skywalking/oap/server/configuration/nacos/ITNacosConfigurationTest.java b/oap-server/server-configuration/configuration-nacos/src/test/java/org/apache/skywalking/oap/server/configuration/nacos/ITNacosConfigurationTest.java
index 62f422b..33dab2e 100644
--- a/oap-server/server-configuration/configuration-nacos/src/test/java/org/apache/skywalking/oap/server/configuration/nacos/ITNacosConfigurationTest.java
+++ b/oap-server/server-configuration/configuration-nacos/src/test/java/org/apache/skywalking/oap/server/configuration/nacos/ITNacosConfigurationTest.java
@@ -23,6 +23,7 @@ import com.alibaba.nacos.api.config.ConfigService;
import com.alibaba.nacos.api.exception.NacosException;
import java.io.FileNotFoundException;
import java.io.Reader;
+import java.util.Collections;
import java.util.Map;
import java.util.Properties;
import lombok.extern.slf4j.Slf4j;
@@ -32,7 +33,11 @@ import org.apache.skywalking.oap.server.library.module.ModuleManager;
import org.apache.skywalking.oap.server.library.util.CollectionUtils;
import org.apache.skywalking.oap.server.library.util.ResourceUtils;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
+import org.testcontainers.containers.GenericContainer;
+import org.testcontainers.containers.wait.strategy.Wait;
+import org.testcontainers.utility.DockerImageName;
import org.yaml.snakeyaml.Yaml;
import static org.junit.Assert.assertEquals;
@@ -46,8 +51,17 @@ public class ITNacosConfigurationTest {
private NacosConfigurationTestProvider provider;
+ @Rule
+ public final GenericContainer<?> container =
+ new GenericContainer<>(DockerImageName.parse("nacos/nacos-server:1.4.2"))
+ .waitingFor(Wait.forLogMessage(".*Nacos started successfully.*", 1))
+ .withEnv(Collections.singletonMap("MODE", "standalone"));
+
@Before
public void setUp() throws Exception {
+ System.setProperty("nacos.host", container.getHost());
+ System.setProperty("nacos.port", String.valueOf(container.getMappedPort(8848)));
+
final ApplicationConfiguration applicationConfiguration = new ApplicationConfiguration();
loadConfig(applicationConfiguration);
diff --git a/oap-server/server-configuration/configuration-zookeeper/pom.xml b/oap-server/server-configuration/configuration-zookeeper/pom.xml
index 911756c..6a37646 100644
--- a/oap-server/server-configuration/configuration-zookeeper/pom.xml
+++ b/oap-server/server-configuration/configuration-zookeeper/pom.xml
@@ -44,97 +44,4 @@
<version>${project.version}</version>
</dependency>
</dependencies>
-
- <profiles>
- <profile>
- <id>CI-with-IT</id>
- <build>
- <plugins>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <configuration>
- <sourceMode>all</sourceMode>
- <logDate>default</logDate>
- <verbose>true</verbose>
- <showLogs>true</showLogs>
- <imagePullPolicy>IfNotPresent</imagePullPolicy>
- </configuration>
- <executions>
- <execution>
- <id>prepare-zookeeper</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- <configuration>
- <images>
- <image>
- <name>zookeeper:${zookeeper.image.version}</name>
- <alias>zookeeper-dynamic-configuration-integration-test-zookeeper</alias>
- <run>
- <ports>
- <port>zk-port:2181</port>
- </ports>
- <wait>
- <log>binding to port</log>
- <time>30000</time>
- </wait>
- </run>
- </image>
- </images>
- </configuration>
- </execution>
- <execution>
- <id>prepare-zookeeper-start</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.gmaven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <version>${gmaven-plugin.version}</version>
- <executions>
- <execution>
- <id>add-default-properties</id>
- <phase>initialize</phase>
- <goals>
- <goal>execute</goal>
- </goals>
- <configuration>
- <providerSelection>2.0</providerSelection>
- <source>
- project.properties.setProperty('docker.hostname', 'localhost')
- </source>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <configuration>
- <systemPropertyVariables>
- <zk.address>
- ${docker.hostname}:${zk-port}
- </zk.address>
- </systemPropertyVariables>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>integration-test</goal>
- <goal>verify</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
diff --git a/oap-server/server-configuration/configuration-zookeeper/src/test/java/org/apache/skywalking/oap/server/configuration/zookeeper/it/ITZookeeperConfigurationTest.java b/oap-server/server-configuration/configuration-zookeeper/src/test/java/org/apache/skywalking/oap/server/configuration/zookeeper/it/ITZookeeperConfigurationTest.java
index 4efb0b7..f5e6b5b 100644
--- a/oap-server/server-configuration/configuration-zookeeper/src/test/java/org/apache/skywalking/oap/server/configuration/zookeeper/it/ITZookeeperConfigurationTest.java
+++ b/oap-server/server-configuration/configuration-zookeeper/src/test/java/org/apache/skywalking/oap/server/configuration/zookeeper/it/ITZookeeperConfigurationTest.java
@@ -33,7 +33,11 @@ import org.apache.skywalking.oap.server.library.module.ModuleManager;
import org.apache.skywalking.oap.server.library.util.CollectionUtils;
import org.apache.skywalking.oap.server.library.util.ResourceUtils;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
+import org.testcontainers.containers.GenericContainer;
+import org.testcontainers.containers.wait.strategy.Wait;
+import org.testcontainers.utility.DockerImageName;
import org.yaml.snakeyaml.Yaml;
import static org.junit.Assert.assertEquals;
@@ -47,8 +51,18 @@ public class ITZookeeperConfigurationTest {
private MockZookeeperConfigurationProvider provider;
+ @Rule
+ public final GenericContainer<?> container =
+ new GenericContainer<>(DockerImageName.parse("zookeeper:3.5"))
+ .waitingFor(Wait.forLogMessage(".*binding to port.*", 1));
+
+ private String zkAddress;
+
@Before
public void setUp() throws Exception {
+ zkAddress = container.getHost() + ":" + container.getMappedPort(2181);
+ System.setProperty("zk.address", zkAddress);
+
final ApplicationConfiguration applicationConfiguration = new ApplicationConfiguration();
loadConfig(applicationConfiguration);
@@ -68,9 +82,6 @@ public class ITZookeeperConfigurationTest {
String key = "test-module.default.testKey";
assertNull(provider.watcher.value());
- String zkAddress = System.getProperty("zk.address");
- log.info("zkAddress: " + zkAddress);
-
RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 3);
CuratorFramework client = CuratorFrameworkFactory.newClient(zkAddress, retryPolicy);
client.start();
@@ -97,9 +108,6 @@ public class ITZookeeperConfigurationTest {
String key = "test-module.default.testKeyGroup";
assertEquals("{}", provider.groupWatcher.groupItems().toString());
- String zkAddress = System.getProperty("zk.address");
- log.info("zkAddress: " + zkAddress);
-
RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 3);
CuratorFramework client = CuratorFrameworkFactory.newClient(zkAddress, retryPolicy);
client.start();
diff --git a/oap-server/server-library/library-elasticsearch-client/pom.xml b/oap-server/server-library/library-elasticsearch-client/pom.xml
index bd4a904..5220193 100644
--- a/oap-server/server-library/library-elasticsearch-client/pom.xml
+++ b/oap-server/server-library/library-elasticsearch-client/pom.xml
@@ -39,12 +39,6 @@
<groupId>com.linecorp.armeria</groupId>
<artifactId>armeria</artifactId>
</dependency>
-
- <dependency>
- <groupId>org.testcontainers</groupId>
- <artifactId>testcontainers</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>elasticsearch</artifactId>
diff --git a/pom.xml b/pom.xml
index 176ec55..51d9097 100755
--- a/pom.xml
+++ b/pom.xml
@@ -341,14 +341,6 @@
</excludes>
</configuration>
</plugin>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>${maven-docker-plugin.version}</version>
- <configuration>
- <containerNamePattern>%a-%t-%i</containerNamePattern>
- </configuration>
- </plugin>
</plugins>
</pluginManagement>
<plugins>
diff --git a/tools/dependencies/known-oap-backend-dependencies.txt b/tools/dependencies/known-oap-backend-dependencies.txt
index 4ee6abc..349c0b8 100755
--- a/tools/dependencies/known-oap-backend-dependencies.txt
+++ b/tools/dependencies/known-oap-backend-dependencies.txt
@@ -21,7 +21,7 @@ client-java-proto-13.0.0.jar
commons-beanutils-1.9.4.jar
commons-codec-1.11.jar
commons-collections4-4.4.jar
-commons-compress-1.21.jar
+commons-compress-1.20.jar
commons-dbcp-1.4.jar
commons-io-2.6.jar
commons-lang3-3.12.0.jar