You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by gu...@apache.org on 2021/10/09 03:08:41 UTC
[dubbo-samples] branch master updated: feat: add FORCE_APPLICATION
case
This is an automated email from the ASF dual-hosted git repository.
guohao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-samples.git
The following commit(s) were added to refs/heads/master by this push:
new f483c0d feat: add FORCE_APPLICATION case
new aa74808 Merge pull request #371 from plusmancn/add-force-application-case
f483c0d is described below
commit f483c0d9a983e186d7c07073da72b06596c4bbc9
Author: plusmancn <pl...@gmail.com>
AuthorDate: Fri Sep 24 23:59:11 2021 +0800
feat: add FORCE_APPLICATION case
---
.../case-configuration.yml | 51 ++++++++++++++++++++++
.../case-versions.conf | 26 +++++++++++
.../pom.xml | 18 ++++++++
.../dubbo-samples-migration-consumer/pom.xml | 5 +++
.../dubbo/migration/consumer/ApiConsumerIT.java | 4 +-
.../dubbo-samples-migration-provider/pom.xml | 5 +++
6 files changed, 108 insertions(+), 1 deletion(-)
diff --git a/dubbo-samples-migration/dubbo-samples-migration-case-application/case-configuration.yml b/dubbo-samples-migration/dubbo-samples-migration-case-application/case-configuration.yml
new file mode 100644
index 0000000..1045047
--- /dev/null
+++ b/dubbo-samples-migration/dubbo-samples-migration-case-application/case-configuration.yml
@@ -0,0 +1,51 @@
+# 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.
+
+props:
+ app_provider: dubbo-samples-migration-provider
+ app_provider_main_class: org.apache.dubbo.migration.provider.ApiProvider
+ app_consumer: dubbo-samples-migration-consumer
+ zookeeper_port: 2181
+ dubbo_port: 50051
+
+services:
+ ${app_provider}:
+ type: app
+ basedir: ../${app_provider}
+ mainClass: ${app_provider_main_class}
+ systemProps:
+ - dubbo.current.protocol=tri
+ - zookeeper.address=${app_provider}
+ - dubbo.application.register-mode=instance
+ checkPorts:
+ - ${zookeeper_port}
+ - ${dubbo_port}
+ checkLog: "dubbo service started"
+
+ ${app_consumer}-test:
+ type: test
+ basedir: ../${app_consumer}
+ tests:
+ - "**/*IT.class"
+ systemProps:
+ - dubbo.current.protocol=tri
+ - zookeeper.address=${app_provider}
+ - dubbo.application.service-discovery.migration=FORCE_APPLICATION
+ waitPortsBeforeRun:
+ - ${app_provider}:${zookeeper_port}
+ - ${app_provider}:${dubbo_port}
+ depends_on:
+ - ${app_provider}
\ No newline at end of file
diff --git a/dubbo-samples-migration/dubbo-samples-migration-case-application/case-versions.conf b/dubbo-samples-migration/dubbo-samples-migration-case-application/case-versions.conf
new file mode 100644
index 0000000..6b125d8
--- /dev/null
+++ b/dubbo-samples-migration/dubbo-samples-migration-case-application/case-versions.conf
@@ -0,0 +1,26 @@
+#
+#
+# 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.
+#
+
+# Supported component versions of the test case
+
+# Spring app
+spring.version=4.*, 5.*
+
+# Support Compatibility test
+dubbo.provider.version=3.*
+dubbo.consumer.version=3.*
diff --git a/dubbo-samples-migration/dubbo-samples-migration-case-application/pom.xml b/dubbo-samples-migration/dubbo-samples-migration-case-application/pom.xml
new file mode 100644
index 0000000..16e9bcf
--- /dev/null
+++ b/dubbo-samples-migration/dubbo-samples-migration-case-application/pom.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>dubbo-samples-migration-case-application</artifactId>
+ <groupId>org.apache.dubbo</groupId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>../dubbo-samples-migration-api</module>
+ <module>../dubbo-samples-migration-provider</module>
+ <module>../dubbo-samples-migration-consumer</module>
+ </modules>
+</project>
\ No newline at end of file
diff --git a/dubbo-samples-migration/dubbo-samples-migration-consumer/pom.xml b/dubbo-samples-migration/dubbo-samples-migration-consumer/pom.xml
index c2cd67b..8537fee 100644
--- a/dubbo-samples-migration/dubbo-samples-migration-consumer/pom.xml
+++ b/dubbo-samples-migration/dubbo-samples-migration-consumer/pom.xml
@@ -48,6 +48,11 @@
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>com.google.protobuf</groupId>
+ <artifactId>protobuf-java</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
diff --git a/dubbo-samples-migration/dubbo-samples-migration-consumer/src/test/java/org/apache/dubbo/migration/consumer/ApiConsumerIT.java b/dubbo-samples-migration/dubbo-samples-migration-consumer/src/test/java/org/apache/dubbo/migration/consumer/ApiConsumerIT.java
index 7c4ffaf..470ce67 100644
--- a/dubbo-samples-migration/dubbo-samples-migration-consumer/src/test/java/org/apache/dubbo/migration/consumer/ApiConsumerIT.java
+++ b/dubbo-samples-migration/dubbo-samples-migration-consumer/src/test/java/org/apache/dubbo/migration/consumer/ApiConsumerIT.java
@@ -16,7 +16,9 @@ import org.junit.Test;
* Consumer test side
*/
public class ApiConsumerIT {
- @Test
+
+
+ @Test(timeout = 30000)
public void consumeInvoke() {
String curProtocol = System.getProperty("dubbo.current.protocol", CommonConstants.DUBBO);
String zookeeperAddress = System.getProperty("zookeeper.address", "127.0.0.1");
diff --git a/dubbo-samples-migration/dubbo-samples-migration-provider/pom.xml b/dubbo-samples-migration/dubbo-samples-migration-provider/pom.xml
index 5d4d889..aa20620 100644
--- a/dubbo-samples-migration/dubbo-samples-migration-provider/pom.xml
+++ b/dubbo-samples-migration/dubbo-samples-migration-provider/pom.xml
@@ -48,6 +48,11 @@
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>com.google.protobuf</groupId>
+ <artifactId>protobuf-java</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org