Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unit tests for 4.x branch #538

Merged
merged 5 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<main.user.dir>${user.dir}</main.user.dir>
<maven.staging.plugin>1.6.7</maven.staging.plugin>
<maven.gpg.pluign>1.5</maven.gpg.pluign>
<skipTests>false</skipTests>
</properties>

<licenses>
Expand Down Expand Up @@ -236,12 +237,6 @@
<version>1.14</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit-coverage</artifactId>
Expand Down Expand Up @@ -384,7 +379,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.9</version>
<version>0.8.12</version>
<configuration>
<skip>false</skip>
</configuration>
Expand All @@ -407,13 +402,21 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<version>2.22.2</version>
<configuration>
<includes>
<!-- 这里需要根据自己的需要指定要跑的单元测试 -->
<include>**/*Test.java</include>
<skipTests>${skipTests}</skipTests>
</includes>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.22.2</version>
</dependency>
</dependencies>
</plugin>

</plugins>
Expand Down
1 change: 0 additions & 1 deletion sofa-tracer-plugins/sofa-tracer-datasource-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;

import javax.sql.DataSource;
import java.io.File;
Expand Down
4 changes: 4 additions & 0 deletions sofa-tracer-plugins/sofa-tracer-dubbo-2.6.x-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>sofa-tracer-dubbo-2.6.x-plugin</artifactId>

<properties>
<skipTests>true</skipTests>
</properties>

<dependencies>
<dependency>
<groupId>com.alibaba</groupId>
Expand Down
5 changes: 5 additions & 0 deletions sofa-tracer-plugins/sofa-tracer-dubbo-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<groupId>com.alipay.sofa</groupId>
<artifactId>tracer-core</artifactId>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
5 changes: 0 additions & 5 deletions sofa-tracer-plugins/sofa-tracer-httpclient-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@
</dependency>

<!-- test dependency -->
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
1 change: 0 additions & 1 deletion sofa-tracer-plugins/sofa-tracer-kafkamq-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
5 changes: 0 additions & 5 deletions sofa-tracer-plugins/sofa-tracer-okhttp-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
<optional>true</optional>
</dependency>
<!-- test dependency -->
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
1 change: 0 additions & 1 deletion sofa-tracer-plugins/sofa-tracer-rabbitmq-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
5 changes: 0 additions & 5 deletions sofa-tracer-plugins/sofa-tracer-resttmplate-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
</dependency>

<!-- test dependency -->
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
5 changes: 0 additions & 5 deletions sofa-tracer-plugins/sofa-tracer-zipkin-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@
<artifactId>spring-context</artifactId>
</dependency>
<!-- test dependency -->
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
10 changes: 0 additions & 10 deletions tracer-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,11 @@
</dependency>

<!-- test 依赖 -->
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit-coverage</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
11 changes: 0 additions & 11 deletions tracer-test/core-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,13 @@
<artifactId>tracer-core</artifactId>
</dependency>
<!-- test 依赖 -->
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.3.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit-coverage</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions tracer-test/log4j2-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<artifactId>sofa-tracer-log4j2-test</artifactId>

<properties>
<log4j2.version>2.17.1</log4j2.version>
<log4j2.version>2.21.1</log4j2.version>
</properties>

<dependencies>
Expand All @@ -36,7 +36,7 @@

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<artifactId>log4j-slf4j2-impl</artifactId>
<version>${log4j2.version}</version>
<scope>test</scope>
<exclusions>
Expand Down
1 change: 0 additions & 1 deletion tracer-test/logback-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.0</version>
</dependency>

<dependency>
Expand Down
Loading