Skip to content
Permalink
Browse files
doc: add usage for dubbo-samples-migration
  • Loading branch information
plusmancn committed Sep 17, 2021
1 parent 8a172e0 commit a68c3f2fab3a396163111e6ce214186586035698
Showing 5 changed files with 55 additions and 2 deletions.
@@ -0,0 +1,34 @@
## Compatibility Testing Scenario Usage
Pre-requirements: Both provider and consumer can not use the same `POM`, because you cannot guarantee that all the codes you write Dubbo 2.0 and 3.0 support at the same time, they must be divided into two independent projects. This is also applicable in daily business compatibility testing

Add new grammar to `case-versions.conf`:
```yaml
# 原常规配置
# dubbo.version=2.7*, 3.*
spring.version=4.*, 5.*
# 支持不同的 servcie 应用,配置不同的 dubbo 版本依赖,与 dubbo.version 二选一
# 为防止构建用例倍级增长,不建议配置多个版本
# dubbo.{service}.verison 中的 service 可以任意自定义
dubbo.provider.version=3.*
dubbo.consumer.version=2.7.*
```
And then in each consumer and provider project, you can configure `POM`'s properties as follows:
```xml
# consumer side
<properties>
<dubbo.consumer.version>2.7.13</dubbo.consumer.version>
</properties>

# provider side
<properties>
<dubbo.provider.version>2.7.13</dubbo.provider.version>
</properties>
```

When the Integration Tests trigger, these properties will be overwritten by maven, for example:
```shell
mvn -Ddubbo.provider.version=3.0.3-SNAPSHOT -Ddubbo.consumer.version=2.7.13 -Dspring.version=4.3.16.RELEASE
```


@@ -24,7 +24,7 @@ props:
services:
${app_provider}:
type: app
basedir: ${app_provider}
basedir: ../${app_provider}
mainClass: ${app_provider_main_class}
systemProps:
- dubbo.current.protocol=dubbo
@@ -37,7 +37,7 @@ services:

${app_consumer}-test:
type: test
basedir: ${app_consumer}
basedir: ../${app_consumer}
tests:
- "**/*IT.class"
systemProps:
File renamed without changes.
@@ -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-default</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>
@@ -13,5 +13,6 @@
<module>dubbo-samples-migration-api</module>
<module>dubbo-samples-migration-provider</module>
<module>dubbo-samples-migration-consumer</module>
<module>dubbo-samples-migration-case-default</module>
</modules>
</project>

0 comments on commit a68c3f2

Please sign in to comment.