mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
f136ad1aab
@ -24,7 +24,7 @@ jobs:
|
||||
- ~/.m2
|
||||
- run:
|
||||
name: "Running build"
|
||||
command: ./mvnw -Pspring -Pdocs clean install cobertura:cobertura -U -nsu --batch-mode -Dmaven.test.redirectTestOutputToFile=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
||||
command: ./mvnw -Pspring -Pdocs clean install -U -nsu --batch-mode -Dmaven.test.redirectTestOutputToFile=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
||||
- run:
|
||||
name: "Aggregate test results"
|
||||
when: always
|
||||
|
51
pom.xml
51
pom.xml
@ -81,8 +81,7 @@
|
||||
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
|
||||
<maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.version>
|
||||
<gmavenplus-plugin.version>1.6</gmavenplus-plugin.version>
|
||||
<cobertura.version>2.1.1</cobertura.version>
|
||||
<cobertura-maven-plugin.version>2.7</cobertura-maven-plugin.version>
|
||||
<jacoco.version>0.7.9</jacoco.version>
|
||||
</properties>
|
||||
|
||||
<modules>
|
||||
@ -166,25 +165,10 @@
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.cobertura</groupId>
|
||||
<artifactId>cobertura-runtime</artifactId>
|
||||
<version>${cobertura.version}</version>
|
||||
<scope>provided</scope>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
@ -208,30 +192,25 @@
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<version>${cobertura-maven-plugin.version}</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.ow2.asm</groupId>
|
||||
<artifactId>asm</artifactId>
|
||||
<version>5.0.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>${jacoco.version}</version>
|
||||
<configuration>
|
||||
<quiet>true</quiet>
|
||||
<formats>
|
||||
<format>html</format>
|
||||
<format>xml</format>
|
||||
</formats>
|
||||
<check/>
|
||||
<check />
|
||||
<destFile>target/coverage-reports/jacoco-unit.exec</destFile>
|
||||
<dataFile>target/coverage-reports/jacoco-unit.exec</dataFile>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<id>jacoco-initialize</id>
|
||||
<goals>
|
||||
<goal>cobertura</goal>
|
||||
<goal>prepare-agent</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>jacoco-site</id>
|
||||
<phase>test</phase>
|
||||
<goals>
|
||||
<goal>report</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
|
@ -453,26 +453,4 @@
|
||||
</pluginRepositories>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
@ -49,28 +49,5 @@
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!-- put here your original plugin configuration for the children -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
|
@ -23,28 +23,11 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -29,25 +29,4 @@
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -25,25 +25,4 @@
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -27,28 +27,11 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -34,14 +34,6 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@ -55,15 +47,6 @@
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -48,14 +48,6 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@ -69,15 +61,6 @@
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -33,14 +33,6 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@ -54,15 +46,6 @@
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -20,26 +20,4 @@
|
||||
<module>nacos-discovery-consumer-example</module>
|
||||
<module>nacos-discovery-provider-example</module>
|
||||
</modules>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
@ -35,14 +35,6 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@ -56,15 +48,6 @@
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -33,14 +33,6 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@ -54,15 +46,6 @@
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -20,26 +20,4 @@
|
||||
<module>nacos-gateway-discovery-example</module>
|
||||
<module>nacos-gateway-provider-example</module>
|
||||
</modules>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
@ -33,14 +33,6 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@ -54,15 +46,6 @@
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -40,14 +40,6 @@
|
||||
</modules>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
@ -57,16 +49,6 @@
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -40,14 +40,6 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@ -61,15 +53,6 @@
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -27,28 +27,11 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -51,14 +51,6 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@ -72,15 +64,6 @@
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -16,14 +16,6 @@
|
||||
<description>api for sentinel dubbo example</description>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
@ -33,15 +25,6 @@
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -40,14 +40,6 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@ -61,15 +53,6 @@
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -39,14 +39,6 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@ -60,15 +52,6 @@
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -35,14 +35,6 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@ -56,15 +48,6 @@
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -82,28 +82,4 @@
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<instrumentation>
|
||||
<excludes>
|
||||
<exclude>org/springframework/cloud/alibaba/nacos/**.*class</exclude>
|
||||
</excludes>
|
||||
</instrumentation>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
@ -1,230 +1,230 @@
|
||||
/*
|
||||
* Copyright (C) 2018 the original author or authors.
|
||||
*
|
||||
* Licensed 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.springframework.cloud.alibaba.sentinel.datasource;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.cloud.alibaba.sentinel.datasource.config.ApolloDataSourceProperties;
|
||||
import org.springframework.cloud.alibaba.sentinel.datasource.config.DataSourcePropertiesConfiguration;
|
||||
import org.springframework.cloud.alibaba.sentinel.datasource.config.FileDataSourceProperties;
|
||||
import org.springframework.cloud.alibaba.sentinel.datasource.config.NacosDataSourceProperties;
|
||||
import org.springframework.cloud.alibaba.sentinel.datasource.config.ZookeeperDataSourceProperties;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:fangjian0423@gmail.com">Jim</a>
|
||||
*/
|
||||
public class DataSourcePropertiesConfigurationTests {
|
||||
|
||||
@Test
|
||||
public void testFileAttr() {
|
||||
DataSourcePropertiesConfiguration dataSourcePropertiesConfiguration = new DataSourcePropertiesConfiguration();
|
||||
assertEquals("DataSourcePropertiesConfiguration valid field size was wrong", 0,
|
||||
dataSourcePropertiesConfiguration.getValidField().size());
|
||||
assertNull("DataSourcePropertiesConfiguration valid properties was not null",
|
||||
dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
|
||||
FileDataSourceProperties fileDataSourceProperties = buildFileProperties();
|
||||
|
||||
dataSourcePropertiesConfiguration.setFile(fileDataSourceProperties);
|
||||
|
||||
assertEquals(
|
||||
"DataSourcePropertiesConfiguration valid field size was wrong after set file attribute",
|
||||
1, dataSourcePropertiesConfiguration.getValidField().size());
|
||||
assertNotNull(
|
||||
"DataSourcePropertiesConfiguration file properties was null after set file attribute",
|
||||
dataSourcePropertiesConfiguration.getFile());
|
||||
assertNotNull(
|
||||
"DataSourcePropertiesConfiguration valid properties was null after set file attribute",
|
||||
dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNacosAttr() {
|
||||
DataSourcePropertiesConfiguration dataSourcePropertiesConfiguration = new DataSourcePropertiesConfiguration();
|
||||
assertEquals("DataSourcePropertiesConfiguration valid field size was wrong", 0,
|
||||
dataSourcePropertiesConfiguration.getValidField().size());
|
||||
assertNull("DataSourcePropertiesConfiguration valid properties was not null",
|
||||
dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
|
||||
NacosDataSourceProperties nacosDataSourceProperties = buildNacosProperties();
|
||||
|
||||
dataSourcePropertiesConfiguration.setNacos(nacosDataSourceProperties);
|
||||
|
||||
assertEquals(
|
||||
"DataSourcePropertiesConfiguration valid field size was wrong after set nacos attribute",
|
||||
1, dataSourcePropertiesConfiguration.getValidField().size());
|
||||
assertNotNull(
|
||||
"DataSourcePropertiesConfiguration nacos properties was null after set nacos attribute",
|
||||
dataSourcePropertiesConfiguration.getNacos());
|
||||
assertNotNull(
|
||||
"DataSourcePropertiesConfiguration valid properties was null after set nacos attribute",
|
||||
dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testZKAttr() {
|
||||
DataSourcePropertiesConfiguration dataSourcePropertiesConfiguration = new DataSourcePropertiesConfiguration();
|
||||
assertEquals("DataSourcePropertiesConfiguration valid field size was wrong", 0,
|
||||
dataSourcePropertiesConfiguration.getValidField().size());
|
||||
assertNull("DataSourcePropertiesConfiguration valid properties was not null",
|
||||
dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
|
||||
ZookeeperDataSourceProperties zookeeperDataSourceProperties = buildZKProperties();
|
||||
|
||||
dataSourcePropertiesConfiguration.setZk(zookeeperDataSourceProperties);
|
||||
|
||||
assertEquals(
|
||||
"DataSourcePropertiesConfiguration valid field size was wrong after set zk attribute",
|
||||
1, dataSourcePropertiesConfiguration.getValidField().size());
|
||||
assertNotNull(
|
||||
"DataSourcePropertiesConfiguration zk properties was null after set zk attribute",
|
||||
dataSourcePropertiesConfiguration.getZk());
|
||||
assertNotNull(
|
||||
"DataSourcePropertiesConfiguration valid properties was null after set zk attribute",
|
||||
dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testApolloAttr() {
|
||||
DataSourcePropertiesConfiguration dataSourcePropertiesConfiguration = new DataSourcePropertiesConfiguration();
|
||||
assertEquals("DataSourcePropertiesConfiguration valid field size was wrong", 0,
|
||||
dataSourcePropertiesConfiguration.getValidField().size());
|
||||
assertNull("DataSourcePropertiesConfiguration valid properties was not null",
|
||||
dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
|
||||
ApolloDataSourceProperties apolloDataSourceProperties = buildApolloProperties();
|
||||
|
||||
dataSourcePropertiesConfiguration.setApollo(apolloDataSourceProperties);
|
||||
|
||||
assertEquals(
|
||||
"DataSourcePropertiesConfiguration valid field size was wrong after set apollo attribute",
|
||||
1, dataSourcePropertiesConfiguration.getValidField().size());
|
||||
assertNotNull(
|
||||
"DataSourcePropertiesConfiguration apollo properties was null after set apollo attribute",
|
||||
dataSourcePropertiesConfiguration.getApollo());
|
||||
assertNotNull(
|
||||
"DataSourcePropertiesConfiguration valid properties was null after set apollo attribute",
|
||||
dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMultiAttr() {
|
||||
DataSourcePropertiesConfiguration dataSourcePropertiesConfiguration = new DataSourcePropertiesConfiguration();
|
||||
assertEquals("DataSourcePropertiesConfiguration valid field size was wrong", 0,
|
||||
dataSourcePropertiesConfiguration.getValidField().size());
|
||||
assertNull("DataSourcePropertiesConfiguration valid properties was not null",
|
||||
dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
|
||||
FileDataSourceProperties fileDataSourceProperties = buildFileProperties();
|
||||
NacosDataSourceProperties nacosDataSourceProperties = buildNacosProperties();
|
||||
|
||||
dataSourcePropertiesConfiguration.setFile(fileDataSourceProperties);
|
||||
dataSourcePropertiesConfiguration.setNacos(nacosDataSourceProperties);
|
||||
|
||||
assertEquals(
|
||||
"DataSourcePropertiesConfiguration valid field size was wrong after set file and nacos attribute",
|
||||
2, dataSourcePropertiesConfiguration.getValidField().size());
|
||||
assertNull(
|
||||
"DataSourcePropertiesConfiguration valid properties was not null after set file and nacos attribute",
|
||||
dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFileConstructor() {
|
||||
DataSourcePropertiesConfiguration dataSourcePropertiesConfiguration = new DataSourcePropertiesConfiguration(
|
||||
buildFileProperties());
|
||||
assertEquals(
|
||||
"DataSourcePropertiesConfiguration file constructor valid field size was wrong",
|
||||
1, dataSourcePropertiesConfiguration.getValidField().size());
|
||||
assertNotNull(
|
||||
"DataSourcePropertiesConfiguration file constructor valid properties was null",
|
||||
dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNacosConstructor() {
|
||||
DataSourcePropertiesConfiguration dataSourcePropertiesConfiguration = new DataSourcePropertiesConfiguration(
|
||||
buildNacosProperties());
|
||||
assertEquals(
|
||||
"DataSourcePropertiesConfiguration nacos constructor valid field size was wrong",
|
||||
1, dataSourcePropertiesConfiguration.getValidField().size());
|
||||
assertNotNull(
|
||||
"DataSourcePropertiesConfiguration nacos constructor valid properties was null",
|
||||
dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testApolloConstructor() {
|
||||
DataSourcePropertiesConfiguration dataSourcePropertiesConfiguration = new DataSourcePropertiesConfiguration(
|
||||
buildApolloProperties());
|
||||
assertEquals(
|
||||
"DataSourcePropertiesConfiguration apollo constructor valid field size was wrong",
|
||||
1, dataSourcePropertiesConfiguration.getValidField().size());
|
||||
assertNotNull(
|
||||
"DataSourcePropertiesConfiguration apollo constructor valid properties was null",
|
||||
dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testZKConstructor() {
|
||||
DataSourcePropertiesConfiguration dataSourcePropertiesConfiguration = new DataSourcePropertiesConfiguration(
|
||||
buildZKProperties());
|
||||
assertEquals(
|
||||
"DataSourcePropertiesConfiguration zk constructor valid field size was wrong",
|
||||
1, dataSourcePropertiesConfiguration.getValidField().size());
|
||||
assertNotNull(
|
||||
"DataSourcePropertiesConfiguration zk constructor valid properties was null",
|
||||
dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
}
|
||||
|
||||
private FileDataSourceProperties buildFileProperties() {
|
||||
FileDataSourceProperties fileDataSourceProperties = new FileDataSourceProperties();
|
||||
|
||||
fileDataSourceProperties.setFile("/tmp/test.json");
|
||||
fileDataSourceProperties.setBufSize(1024);
|
||||
fileDataSourceProperties.setRecommendRefreshMs(2000);
|
||||
return fileDataSourceProperties;
|
||||
}
|
||||
|
||||
private NacosDataSourceProperties buildNacosProperties() {
|
||||
NacosDataSourceProperties nacosDataSourceProperties = new NacosDataSourceProperties();
|
||||
nacosDataSourceProperties.setServerAddr("127.0.0.1:8848");
|
||||
nacosDataSourceProperties.setDataId("sentinel");
|
||||
nacosDataSourceProperties.setGroupId("custom-group");
|
||||
return nacosDataSourceProperties;
|
||||
}
|
||||
|
||||
private ApolloDataSourceProperties buildApolloProperties() {
|
||||
ApolloDataSourceProperties apolloDataSourceProperties = new ApolloDataSourceProperties();
|
||||
apolloDataSourceProperties.setFlowRulesKey("test-key");
|
||||
apolloDataSourceProperties.setDefaultFlowRuleValue("dft-val");
|
||||
apolloDataSourceProperties.setNamespaceName("namespace");
|
||||
return apolloDataSourceProperties;
|
||||
}
|
||||
|
||||
private ZookeeperDataSourceProperties buildZKProperties() {
|
||||
ZookeeperDataSourceProperties zookeeperDataSourceProperties = new ZookeeperDataSourceProperties();
|
||||
|
||||
zookeeperDataSourceProperties.setServerAddr("localhost:2181");
|
||||
zookeeperDataSourceProperties.setPath("/path");
|
||||
return zookeeperDataSourceProperties;
|
||||
}
|
||||
|
||||
}
|
||||
///*
|
||||
// * Copyright (C) 2018 the original author or authors.
|
||||
// *
|
||||
// * Licensed 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.springframework.cloud.alibaba.sentinel.datasource;
|
||||
//
|
||||
//import static org.junit.Assert.assertEquals;
|
||||
//import static org.junit.Assert.assertNotNull;
|
||||
//import static org.junit.Assert.assertNull;
|
||||
//
|
||||
//import org.junit.Test;
|
||||
//import org.springframework.cloud.alibaba.sentinel.datasource.config.ApolloDataSourceProperties;
|
||||
//import org.springframework.cloud.alibaba.sentinel.datasource.config.DataSourcePropertiesConfiguration;
|
||||
//import org.springframework.cloud.alibaba.sentinel.datasource.config.FileDataSourceProperties;
|
||||
//import org.springframework.cloud.alibaba.sentinel.datasource.config.NacosDataSourceProperties;
|
||||
//import org.springframework.cloud.alibaba.sentinel.datasource.config.ZookeeperDataSourceProperties;
|
||||
//
|
||||
///**
|
||||
// * @author <a href="mailto:fangjian0423@gmail.com">Jim</a>
|
||||
// */
|
||||
//public class DataSourcePropertiesConfigurationTests {
|
||||
//
|
||||
// @Test
|
||||
// public void testFileAttr() {
|
||||
// DataSourcePropertiesConfiguration dataSourcePropertiesConfiguration = new DataSourcePropertiesConfiguration();
|
||||
// assertEquals("DataSourcePropertiesConfiguration valid field size was wrong", 0,
|
||||
// dataSourcePropertiesConfiguration.getValidField().size());
|
||||
// assertNull("DataSourcePropertiesConfiguration valid properties was not null",
|
||||
// dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
//
|
||||
// FileDataSourceProperties fileDataSourceProperties = buildFileProperties();
|
||||
//
|
||||
// dataSourcePropertiesConfiguration.setFile(fileDataSourceProperties);
|
||||
//
|
||||
// assertEquals(
|
||||
// "DataSourcePropertiesConfiguration valid field size was wrong after set file attribute",
|
||||
// 1, dataSourcePropertiesConfiguration.getValidField().size());
|
||||
// assertNotNull(
|
||||
// "DataSourcePropertiesConfiguration file properties was null after set file attribute",
|
||||
// dataSourcePropertiesConfiguration.getFile());
|
||||
// assertNotNull(
|
||||
// "DataSourcePropertiesConfiguration valid properties was null after set file attribute",
|
||||
// dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void testNacosAttr() {
|
||||
// DataSourcePropertiesConfiguration dataSourcePropertiesConfiguration = new DataSourcePropertiesConfiguration();
|
||||
// assertEquals("DataSourcePropertiesConfiguration valid field size was wrong", 0,
|
||||
// dataSourcePropertiesConfiguration.getValidField().size());
|
||||
// assertNull("DataSourcePropertiesConfiguration valid properties was not null",
|
||||
// dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
//
|
||||
// NacosDataSourceProperties nacosDataSourceProperties = buildNacosProperties();
|
||||
//
|
||||
// dataSourcePropertiesConfiguration.setNacos(nacosDataSourceProperties);
|
||||
//
|
||||
// assertEquals(
|
||||
// "DataSourcePropertiesConfiguration valid field size was wrong after set nacos attribute",
|
||||
// 1, dataSourcePropertiesConfiguration.getValidField().size());
|
||||
// assertNotNull(
|
||||
// "DataSourcePropertiesConfiguration nacos properties was null after set nacos attribute",
|
||||
// dataSourcePropertiesConfiguration.getNacos());
|
||||
// assertNotNull(
|
||||
// "DataSourcePropertiesConfiguration valid properties was null after set nacos attribute",
|
||||
// dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void testZKAttr() {
|
||||
// DataSourcePropertiesConfiguration dataSourcePropertiesConfiguration = new DataSourcePropertiesConfiguration();
|
||||
// assertEquals("DataSourcePropertiesConfiguration valid field size was wrong", 0,
|
||||
// dataSourcePropertiesConfiguration.getValidField().size());
|
||||
// assertNull("DataSourcePropertiesConfiguration valid properties was not null",
|
||||
// dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
//
|
||||
// ZookeeperDataSourceProperties zookeeperDataSourceProperties = buildZKProperties();
|
||||
//
|
||||
// dataSourcePropertiesConfiguration.setZk(zookeeperDataSourceProperties);
|
||||
//
|
||||
// assertEquals(
|
||||
// "DataSourcePropertiesConfiguration valid field size was wrong after set zk attribute",
|
||||
// 1, dataSourcePropertiesConfiguration.getValidField().size());
|
||||
// assertNotNull(
|
||||
// "DataSourcePropertiesConfiguration zk properties was null after set zk attribute",
|
||||
// dataSourcePropertiesConfiguration.getZk());
|
||||
// assertNotNull(
|
||||
// "DataSourcePropertiesConfiguration valid properties was null after set zk attribute",
|
||||
// dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void testApolloAttr() {
|
||||
// DataSourcePropertiesConfiguration dataSourcePropertiesConfiguration = new DataSourcePropertiesConfiguration();
|
||||
// assertEquals("DataSourcePropertiesConfiguration valid field size was wrong", 0,
|
||||
// dataSourcePropertiesConfiguration.getValidField().size());
|
||||
// assertNull("DataSourcePropertiesConfiguration valid properties was not null",
|
||||
// dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
//
|
||||
// ApolloDataSourceProperties apolloDataSourceProperties = buildApolloProperties();
|
||||
//
|
||||
// dataSourcePropertiesConfiguration.setApollo(apolloDataSourceProperties);
|
||||
//
|
||||
// assertEquals(
|
||||
// "DataSourcePropertiesConfiguration valid field size was wrong after set apollo attribute",
|
||||
// 1, dataSourcePropertiesConfiguration.getValidField().size());
|
||||
// assertNotNull(
|
||||
// "DataSourcePropertiesConfiguration apollo properties was null after set apollo attribute",
|
||||
// dataSourcePropertiesConfiguration.getApollo());
|
||||
// assertNotNull(
|
||||
// "DataSourcePropertiesConfiguration valid properties was null after set apollo attribute",
|
||||
// dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void testMultiAttr() {
|
||||
// DataSourcePropertiesConfiguration dataSourcePropertiesConfiguration = new DataSourcePropertiesConfiguration();
|
||||
// assertEquals("DataSourcePropertiesConfiguration valid field size was wrong", 0,
|
||||
// dataSourcePropertiesConfiguration.getValidField().size());
|
||||
// assertNull("DataSourcePropertiesConfiguration valid properties was not null",
|
||||
// dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
//
|
||||
// FileDataSourceProperties fileDataSourceProperties = buildFileProperties();
|
||||
// NacosDataSourceProperties nacosDataSourceProperties = buildNacosProperties();
|
||||
//
|
||||
// dataSourcePropertiesConfiguration.setFile(fileDataSourceProperties);
|
||||
// dataSourcePropertiesConfiguration.setNacos(nacosDataSourceProperties);
|
||||
//
|
||||
// assertEquals(
|
||||
// "DataSourcePropertiesConfiguration valid field size was wrong after set file and nacos attribute",
|
||||
// 2, dataSourcePropertiesConfiguration.getValidField().size());
|
||||
// assertNull(
|
||||
// "DataSourcePropertiesConfiguration valid properties was not null after set file and nacos attribute",
|
||||
// dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void testFileConstructor() {
|
||||
// DataSourcePropertiesConfiguration dataSourcePropertiesConfiguration = new DataSourcePropertiesConfiguration(
|
||||
// buildFileProperties());
|
||||
// assertEquals(
|
||||
// "DataSourcePropertiesConfiguration file constructor valid field size was wrong",
|
||||
// 1, dataSourcePropertiesConfiguration.getValidField().size());
|
||||
// assertNotNull(
|
||||
// "DataSourcePropertiesConfiguration file constructor valid properties was null",
|
||||
// dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void testNacosConstructor() {
|
||||
// DataSourcePropertiesConfiguration dataSourcePropertiesConfiguration = new DataSourcePropertiesConfiguration(
|
||||
// buildNacosProperties());
|
||||
// assertEquals(
|
||||
// "DataSourcePropertiesConfiguration nacos constructor valid field size was wrong",
|
||||
// 1, dataSourcePropertiesConfiguration.getValidField().size());
|
||||
// assertNotNull(
|
||||
// "DataSourcePropertiesConfiguration nacos constructor valid properties was null",
|
||||
// dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void testApolloConstructor() {
|
||||
// DataSourcePropertiesConfiguration dataSourcePropertiesConfiguration = new DataSourcePropertiesConfiguration(
|
||||
// buildApolloProperties());
|
||||
// assertEquals(
|
||||
// "DataSourcePropertiesConfiguration apollo constructor valid field size was wrong",
|
||||
// 1, dataSourcePropertiesConfiguration.getValidField().size());
|
||||
// assertNotNull(
|
||||
// "DataSourcePropertiesConfiguration apollo constructor valid properties was null",
|
||||
// dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// public void testZKConstructor() {
|
||||
// DataSourcePropertiesConfiguration dataSourcePropertiesConfiguration = new DataSourcePropertiesConfiguration(
|
||||
// buildZKProperties());
|
||||
// assertEquals(
|
||||
// "DataSourcePropertiesConfiguration zk constructor valid field size was wrong",
|
||||
// 1, dataSourcePropertiesConfiguration.getValidField().size());
|
||||
// assertNotNull(
|
||||
// "DataSourcePropertiesConfiguration zk constructor valid properties was null",
|
||||
// dataSourcePropertiesConfiguration.getValidDataSourceProperties());
|
||||
// }
|
||||
//
|
||||
// private FileDataSourceProperties buildFileProperties() {
|
||||
// FileDataSourceProperties fileDataSourceProperties = new FileDataSourceProperties();
|
||||
//
|
||||
// fileDataSourceProperties.setFile("/tmp/test.json");
|
||||
// fileDataSourceProperties.setBufSize(1024);
|
||||
// fileDataSourceProperties.setRecommendRefreshMs(2000);
|
||||
// return fileDataSourceProperties;
|
||||
// }
|
||||
//
|
||||
// private NacosDataSourceProperties buildNacosProperties() {
|
||||
// NacosDataSourceProperties nacosDataSourceProperties = new NacosDataSourceProperties();
|
||||
// nacosDataSourceProperties.setServerAddr("127.0.0.1:8848");
|
||||
// nacosDataSourceProperties.setDataId("sentinel");
|
||||
// nacosDataSourceProperties.setGroupId("custom-group");
|
||||
// return nacosDataSourceProperties;
|
||||
// }
|
||||
//
|
||||
// private ApolloDataSourceProperties buildApolloProperties() {
|
||||
// ApolloDataSourceProperties apolloDataSourceProperties = new ApolloDataSourceProperties();
|
||||
// apolloDataSourceProperties.setFlowRulesKey("test-key");
|
||||
// apolloDataSourceProperties.setDefaultFlowRuleValue("dft-val");
|
||||
// apolloDataSourceProperties.setNamespaceName("namespace");
|
||||
// return apolloDataSourceProperties;
|
||||
// }
|
||||
//
|
||||
// private ZookeeperDataSourceProperties buildZKProperties() {
|
||||
// ZookeeperDataSourceProperties zookeeperDataSourceProperties = new ZookeeperDataSourceProperties();
|
||||
//
|
||||
// zookeeperDataSourceProperties.setServerAddr("localhost:2181");
|
||||
// zookeeperDataSourceProperties.setPath("/path");
|
||||
// return zookeeperDataSourceProperties;
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
@ -20,26 +20,4 @@
|
||||
<module>spring-cloud-starter-stream-rocketmq</module>
|
||||
<module>spring-cloud-starter-bus-rocketmq</module>
|
||||
</modules>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -17,26 +17,4 @@
|
||||
<module>spring-cloud-starter-alicloud-schedulerx</module>
|
||||
<module>spring-cloud-starter-alicloud-sms</module>
|
||||
</modules>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<check/>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
Loading…
x
Reference in New Issue
Block a user