Add external zk case configurations (#209)
diff --git a/dubbo-samples-generic/dubbo-samples-generic-call/case-configuration.yml b/dubbo-samples-generic/dubbo-samples-generic-call/case-configuration.yml
new file mode 100644
index 0000000..d1d9699
--- /dev/null
+++ b/dubbo-samples-generic/dubbo-samples-generic-call/case-configuration.yml
@@ -0,0 +1,24 @@
+# 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.
+
+from: app-external-zookeeper.yml
+
+props:
+ project_name: dubbo-samples-generic-call
+ project_dir: dubbo-samples-generic-call-provider
+ main_class: org.apache.dubbo.samples.generic.call.GenericCallProvider
+ dubbo_port: 20880
+
diff --git a/dubbo-samples-governance/dubbo-samples-servicelevel-override/case-configuration.yml b/dubbo-samples-governance/dubbo-samples-servicelevel-override/case-configuration.yml
new file mode 100644
index 0000000..9746ae8
--- /dev/null
+++ b/dubbo-samples-governance/dubbo-samples-servicelevel-override/case-configuration.yml
@@ -0,0 +1,23 @@
+# 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.
+
+from: app-external-zookeeper.yml
+
+props:
+ project_name: dubbo-samples-servicelevel-override
+ main_class: org.apache.dubbo.samples.governance.BasicProvider
+ dubbo_port: 20880
+
diff --git a/dubbo-samples-monitor/case-configuration.yml b/dubbo-samples-monitor/case-configuration.yml
new file mode 100644
index 0000000..4e2ea13
--- /dev/null
+++ b/dubbo-samples-monitor/case-configuration.yml
@@ -0,0 +1,23 @@
+# 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.
+
+from: app-external-zookeeper.yml
+
+props:
+ project_name: dubbo-samples-monitor
+ main_class: org.apache.dubbo.samples.monitor.BasicProvider
+ dubbo_port: 20880
+
diff --git a/dubbo-samples-monitor/pom.xml b/dubbo-samples-monitor/pom.xml
index ff7697b..e3a3362 100644
--- a/dubbo-samples-monitor/pom.xml
+++ b/dubbo-samples-monitor/pom.xml
@@ -32,28 +32,43 @@
<dubbo.version>2.7.7</dubbo.version>
<spring.version>4.3.16.RELEASE</spring.version>
<junit.version>4.12</junit.version>
- <docker-maven-plugin.version>0.30.0</docker-maven-plugin.version>
- <jib-maven-plugin.version>1.2.0</jib-maven-plugin.version>
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
- <maven-failsafe-plugin.version>2.21.0</maven-failsafe-plugin.version>
- <image.name>${project.artifactId}:${dubbo.version}</image.name>
- <java-image.name>openjdk:8</java-image.name>
- <dubbo.port>20890</dubbo.port>
- <zookeeper.port>2181</zookeeper.port>
- <main-class>org.apache.dubbo.samples.monitor.BasicProvider</main-class>
</properties>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-framework-bom</artifactId>
+ <version>${spring.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-bom</artifactId>
+ <version>${dubbo.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-dependencies-zookeeper</artifactId>
+ <version>${dubbo.version}</version>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
<dependencies>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
- <version>${dubbo.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-dependencies-zookeeper</artifactId>
- <version>${dubbo.version}</version>
<type>pom</type>
</dependency>
@@ -67,133 +82,11 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
- <version>${spring.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
- <profile>
- <id>dubbo-integration-test</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-maven-address-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <executions>
- <execution>
- <goals>
- <goal>local-address</goal>
- </goals>
- <configuration>
- <localAddress>dubbo-local-address</localAddress>
- </configuration>
- <phase>initialize</phase>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>com.google.cloud.tools</groupId>
- <artifactId>jib-maven-plugin</artifactId>
- <version>${jib-maven-plugin.version}</version>
- <configuration>
- <from>
- <image>${java-image.name}</image>
- </from>
- <to>
- <image>${image.name}</image>
- </to>
- <container>
- <mainClass>${main-class}</mainClass>
- <environment>
- <DUBBO_IP_TO_REGISTRY>${dubbo-local-address}</DUBBO_IP_TO_REGISTRY>
- </environment>
- <jvmFlags>
- <jvmFlag>-Dzookeeper.address=${dubbo-local-address}</jvmFlag>
- </jvmFlags>
- </container>
- </configuration>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>dockerBuild</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>${docker-maven-plugin.version}</version>
- <configuration>
- <images>
- <image>
- <name>zookeeper:latest</name>
- <run>
- <ports>
- <port>${zookeeper.port}:${zookeeper.port}</port>
- </ports>
- </run>
- </image>
- <image>
- <name>${image.name}</name>
- <run>
- <ports>
- <port>${dubbo.port}:${dubbo.port}</port>
- </ports>
- <wait>
- <log>dubbo service started</log>
- </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>
- <version>${maven-failsafe-plugin.version}</version>
- <executions>
- <execution>
- <goals>
- <goal>integration-test</goal>
- <goal>verify</goal>
- </goals>
- <configuration>
- <systemPropertyVariables>
- <zookeeper.address>${dubbo-local-address}</zookeeper.address>
- </systemPropertyVariables>
- <includes>
- <include>**/*IT.java</include>
- </includes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
<!-- For jdk 11 above JavaEE annotation -->
<profile>
<id>javax.annotation</id>
diff --git a/dubbo-samples-monitor/src/main/resources/spring/dubbo-demo-provider.xml b/dubbo-samples-monitor/src/main/resources/spring/dubbo-demo-provider.xml
index 8ee46d4..e146826 100644
--- a/dubbo-samples-monitor/src/main/resources/spring/dubbo-demo-provider.xml
+++ b/dubbo-samples-monitor/src/main/resources/spring/dubbo-demo-provider.xml
@@ -29,7 +29,7 @@
<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
- <dubbo:protocol name="dubbo" port="20890"/>
+ <dubbo:protocol name="dubbo" port="20880"/>
<bean id="demoService" class="org.apache.dubbo.samples.monitor.impl.DemoServiceImpl"/>
diff --git a/dubbo-samples-protostuff/case-configuration.yml b/dubbo-samples-protostuff/case-configuration.yml
new file mode 100644
index 0000000..7b5248d
--- /dev/null
+++ b/dubbo-samples-protostuff/case-configuration.yml
@@ -0,0 +1,24 @@
+# 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.
+
+from: app-external-zookeeper.yml
+
+props:
+ project_name: dubbo-samples-protostuff
+ project_dir: dubbo-samples-protostuff-provider
+ main_class: org.dubbo.samples.protostuff.provider.ProviderApp
+ dubbo_port: 20880
+
diff --git a/dubbo-samples-sentinel/case-configuration.yml b/dubbo-samples-sentinel/case-configuration.yml
new file mode 100644
index 0000000..f6e2383
--- /dev/null
+++ b/dubbo-samples-sentinel/case-configuration.yml
@@ -0,0 +1,23 @@
+# 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.
+
+from: app-external-zookeeper.yml
+
+props:
+ project_name: dubbo-samples-sentinel
+ main_class: org.apache.samples.sentinel.FooProviderBootstrap
+ dubbo_port: 20880
+
diff --git a/test/dubbo-scenario-builder/src/main/resources/configs/app-builtin-zookeeper.yml b/test/dubbo-scenario-builder/src/main/resources/configs/app-builtin-zookeeper.yml
index 3be4b72..d54d191 100644
--- a/test/dubbo-scenario-builder/src/main/resources/configs/app-builtin-zookeeper.yml
+++ b/test/dubbo-scenario-builder/src/main/resources/configs/app-builtin-zookeeper.yml
@@ -27,13 +27,14 @@
props:
# project_name: dubbo-samples-xxx
# main_class: org.apache.dubbo.samples.xxx.XxxProviderBootstrap
+ project_dir: .
zookeeper_port: 2181
dubbo_port: 20880
services:
${project_name}:
type: app
- basedir: .
+ basedir: ${project_dir}
mainClass: ${main_class}
systemProps:
- zookeeper.address=${project_name}
@@ -45,7 +46,7 @@
${project_name}-test:
type: test
- basedir: .
+ basedir: ${project_dir}
tests:
- "**/*IT.class"
systemProps:
diff --git a/test/dubbo-scenario-builder/src/main/resources/configs/app-external-zookeeper.yml b/test/dubbo-scenario-builder/src/main/resources/configs/app-external-zookeeper.yml
index 6031fe2..7a5fd75 100644
--- a/test/dubbo-scenario-builder/src/main/resources/configs/app-external-zookeeper.yml
+++ b/test/dubbo-scenario-builder/src/main/resources/configs/app-external-zookeeper.yml
@@ -27,6 +27,7 @@
props:
# project_name: dubbo-samples-xxx
# main_class: org.apache.dubbo.samples.xxx.XxxProviderBootstrap
+ project_dir: .
dubbo_port: 20880
zookeeper_version: latest
@@ -36,7 +37,7 @@
${project_name}:
type: app
- basedir: .
+ basedir: ${project_dir}
mainClass: ${main_class}
systemProps:
- zookeeper.address=zookeeper
@@ -49,7 +50,7 @@
${project_name}-test:
type: test
- basedir: .
+ basedir: ${project_dir}
tests:
- "**/*IT.class"
systemProps:
diff --git a/test/run-tests.sh b/test/run-tests.sh
index 758ab8c..70ba72f 100755
--- a/test/run-tests.sh
+++ b/test/run-tests.sh
@@ -161,11 +161,11 @@
fi
#check build
- echo "$log_prefix Checking project artifacts .."
- if [ ! -d "$project_home/target" ]; then
- echo "$log_prefix $TEST_FAILURE: Missing artifacts" | tee -a $testResultFile
- return 1
- fi
+# echo "$log_prefix Checking project artifacts .."
+# if [ ! -d "$project_home/target" ]; then
+# echo "$log_prefix $TEST_FAILURE: Missing artifacts" | tee -a $testResultFile
+# return 1
+# fi
# generate case configuration
mkdir -p $scenario_home/logs