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

jimin pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/incubator-seata.git


The following commit(s) were added to refs/heads/2.x by this push:
     new 253575f5c9 test: fix brittle RPC status test (#7819)
253575f5c9 is described below

commit 253575f5c94a3cc1af79a5c6a058d9766d7144e1
Author: Steven Kusuman <[email protected]>
AuthorDate: Sun Dec 28 07:54:43 2025 -0600

    test: fix brittle RPC status test (#7819)
---
 common/src/test/java/org/apache/seata/common/rpc/RpcStatusTest.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/common/src/test/java/org/apache/seata/common/rpc/RpcStatusTest.java 
b/common/src/test/java/org/apache/seata/common/rpc/RpcStatusTest.java
index 1873424813..f654c4f1c1 100644
--- a/common/src/test/java/org/apache/seata/common/rpc/RpcStatusTest.java
+++ b/common/src/test/java/org/apache/seata/common/rpc/RpcStatusTest.java
@@ -50,6 +50,10 @@ public class RpcStatusTest {
 
     @Test
     public void endCount() {
+        // ensure a correct state before testing
+        RpcStatus.removeStatus(SERVICE);
+        RpcStatus.beginCount(SERVICE);
+
         RpcStatus.endCount(SERVICE);
         Assertions.assertEquals(RpcStatus.getStatus(SERVICE).getActive(), 0);
         Assertions.assertEquals(RpcStatus.getStatus(SERVICE).getTotal(), 1);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to