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

jianbin 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 df0d72b9b1 test: fixes CI errors caused by timing issues in 
ZkConfigurationTest (#7907)
df0d72b9b1 is described below

commit df0d72b9b1120086f2e7ca2746346a3a2a514644
Author: maple <[email protected]>
AuthorDate: Sun Dec 28 13:43:17 2025 +0800

    test: fixes CI errors caused by timing issues in ZkConfigurationTest (#7907)
---
 changes/en-us/2.x.md                                         |  1 +
 changes/zh-cn/2.x.md                                         |  1 +
 .../java/org/apache/seata/config/zk/ZkConfigurationTest.java | 12 ++++++++++++
 3 files changed, 14 insertions(+)

diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md
index c8ac84e67c..99e2dcbe56 100644
--- a/changes/en-us/2.x.md
+++ b/changes/en-us/2.x.md
@@ -157,6 +157,7 @@ Add changes here for all PR submitted to the 2.x branch.
 - [[#7827](https://github.com/apache/incubator-seata/pull/7827)] Fix 
non-deteriministic in TableMetaTest#testGetPrimaryKeyOnlyName
 - [[#7859](https://github.com/apache/incubator-seata/pull/7859)] Fix flaky 
tests in MetadataTest caused by shared state and brittle toString assertions
 - [[#7858](https://github.com/apache/incubator-seata/pull/7858)] Fix flakiness 
in HttpTest.convertParamOfJsonStringTest caused by non-deterministic Map 
iteration order
+- [[#7907](https://github.com/apache/incubator-seata/pull/7907)] test: fixes 
CI errors caused by timing issues in ZkConfigurationTest
 
 
 ### refactor:
diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md
index af12825d48..5b97efd42b 100644
--- a/changes/zh-cn/2.x.md
+++ b/changes/zh-cn/2.x.md
@@ -157,6 +157,7 @@
 - [[#7827](https://github.com/apache/incubator-seata/pull/7827)] 修复 
TableMetaTest 中因主键名称列表顺序不稳定导致的单测间歇性失败问题
 - [[#7859](https://github.com/apache/incubator-seata/pull/7859)] 修复 
`MetadataTest` 因共享状态与依赖 `toString()` 输出不稳定导致的测试用例间歇性失败问题
 - [[#7858](https://github.com/apache/incubator-seata/pull/7858)] 修复 
`HttpTest.convertParamOfJsonStringTest` 因 Map 遍历顺序不确定导致的测试用例间歇性失败问题
+- [[#7907](https://github.com/apache/incubator-seata/pull/7907)] test: 
修复ZkConfigurationTest的时序问题导致的ci错误
 
 
 ### refactor:
diff --git 
a/config/seata-config-zk/src/test/java/org/apache/seata/config/zk/ZkConfigurationTest.java
 
b/config/seata-config-zk/src/test/java/org/apache/seata/config/zk/ZkConfigurationTest.java
index fb8b614a51..99ff131a91 100644
--- 
a/config/seata-config-zk/src/test/java/org/apache/seata/config/zk/ZkConfigurationTest.java
+++ 
b/config/seata-config-zk/src/test/java/org/apache/seata/config/zk/ZkConfigurationTest.java
@@ -93,6 +93,12 @@ public class ZkConfigurationTest {
         };
         
zookeeperConfiguration.createPersistent(zookeeperConfiguration.buildPath(dataId),
 "value");
         zookeeperConfiguration.addConfigListener(dataId, changeListener);
+        // Wait for listener to be fully registered
+        try {
+            Thread.sleep(200);
+        } catch (InterruptedException e) {
+            Thread.currentThread().interrupt();
+        }
         zookeeperConfiguration.putConfig(dataId, "value2");
         try {
             countDownLatch.await(10000, TimeUnit.MILLISECONDS);
@@ -128,6 +134,12 @@ public class ZkConfigurationTest {
 
         zookeeperConfiguration.addConfigListener(dataId, changeListener);
         zookeeperConfiguration.putConfig(dataId, "value2");
+        // Wait for listener to be fully registered
+        try {
+            Thread.sleep(200);
+        } catch (InterruptedException e) {
+            Thread.currentThread().interrupt();
+        }
         boolean remove = zookeeperConfiguration.removeConfig(dataId);
         Assertions.assertTrue(remove);
         try {


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

Reply via email to