This is an automated email from the ASF dual-hosted git repository.

aaronai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git

commit 8f208e72ff3d50df994969a9f5e9bf2caff6ebec
Author: Aaron Ai <[email protected]>
AuthorDate: Thu Jun 30 11:54:04 2022 +0800

    Java: adapt with the latest protocol
---
 .../apache/rocketmq/client/java/tool/TestBase.java |  9 ++--
 java/pom.xml                                       | 61 ++++++++++++++++++----
 2 files changed, 54 insertions(+), 16 deletions(-)

diff --git 
a/java/client/src/test/java/org/apache/rocketmq/client/java/tool/TestBase.java 
b/java/client/src/test/java/org/apache/rocketmq/client/java/tool/TestBase.java
index b30bf93..52f5611 100644
--- 
a/java/client/src/test/java/org/apache/rocketmq/client/java/tool/TestBase.java
+++ 
b/java/client/src/test/java/org/apache/rocketmq/client/java/tool/TestBase.java
@@ -282,9 +282,8 @@ public class TestBase {
         final Status status = Status.newBuilder().setCode(Code.OK).build();
         SettableFuture<SendMessageResponse> future0 = SettableFuture.create();
         final String messageId = 
MessageIdCodec.getInstance().nextMessageId().toString();
-        SendResultEntry entry =
-            
SendResultEntry.newBuilder().setMessageId(messageId).setTransactionId(FAKE_TRANSACTION_ID)
-                .setOffset(1).build();
+        SendResultEntry entry = 
SendResultEntry.newBuilder().setMessageId(messageId)
+            
.setTransactionId(FAKE_TRANSACTION_ID).setStatus(status).setOffset(1).build();
         SendMessageResponse response = 
SendMessageResponse.newBuilder().setStatus(status).addEntries(entry).build();
         future0.set(response);
         return future0;
@@ -302,9 +301,9 @@ public class TestBase {
         final Status status = Status.newBuilder().setCode(Code.OK).build();
         SettableFuture<SendMessageResponse> future0 = SettableFuture.create();
         final String messageId = 
MessageIdCodec.getInstance().nextMessageId().toString();
-        SendResultEntry entry0 = 
SendResultEntry.newBuilder().setMessageId(messageId)
+        SendResultEntry entry0 = 
SendResultEntry.newBuilder().setMessageId(messageId).setStatus(status)
             .setOffset(1).build();
-        SendResultEntry entry1 = 
SendResultEntry.newBuilder().setMessageId(messageId)
+        SendResultEntry entry1 = 
SendResultEntry.newBuilder().setMessageId(messageId).setStatus(status)
             .setOffset(2).build();
         SendMessageResponse response = 
SendMessageResponse.newBuilder().setStatus(status).addEntries(entry0)
             .addEntries(entry1).build();
diff --git a/java/pom.xml b/java/pom.xml
index 6019e28..1c86b7e 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -47,6 +47,7 @@
         <!-- plugin -->
         <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
         <spotbugs-plugin.version>4.2.2</spotbugs-plugin.version>
+        <jacoco-maven-plugin.version>0.8.6</jacoco-maven-plugin.version>
         
<maven-checkstyle-plugin.version>3.1.1</maven-checkstyle-plugin.version>
         <maven-enforcer-plugin.version>1.4.1</maven-enforcer-plugin.version>
         <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
@@ -225,17 +226,6 @@
         </dependencies>
     </dependencyManagement>
 
-    <distributionManagement>
-        <repository>
-            <id>releases</id>
-            <url>http://mvnrepo.alibaba-inc.com/mvn/releases</url>
-        </repository>
-        <snapshotRepository>
-            <id>snapshots</id>
-            <url>http://mvnrepo.alibaba-inc.com/mvn/snapshots</url>
-        </snapshotRepository>
-    </distributionManagement>
-
     <build>
         <plugins>
             <plugin>
@@ -266,6 +256,55 @@
                     <effort>Max</effort>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <version>${jacoco-maven-plugin.version}</version>
+                <executions>
+                    <execution>
+                        <id>prepare-agent</id>
+                        <goals>
+                            <goal>prepare-agent</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>coverage-check</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>report</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>report</goal>
+                        </goals>
+                    </execution>
+
+                </executions>
+                <configuration>
+                    <rules>
+                        <rule>
+                            <element>CLASS</element>
+                            <excludes>
+                                <exclude>JAVAC.SYNTHCLASS</exclude>
+                                <exclude>JAVAC.SYNTHMETH</exclude>
+                            </excludes>
+                        </rule>
+                        <rule>
+                            <element>BUNDLE</element>
+                            <limits>
+                                <limit>
+                                    <counter>LINE</counter>
+                                    <value>COVEREDRATIO</value>
+                                    <minimum>0.50</minimum>
+                                </limit>
+                            </limits>
+                        </rule>
+                    </rules>
+                </configuration>
+            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-checkstyle-plugin</artifactId>

Reply via email to