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

xingfudeshi 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 26c3637bd3 test: Fix flaky convertParamOfJsonStringTest in HttpTest 
(#7858)
26c3637bd3 is described below

commit 26c3637bd33bafc8d3fc91a47ac0eb298e9185ee
Author: Xiaoyang Cai <[email protected]>
AuthorDate: Mon Dec 15 20:08:10 2025 -0600

    test: Fix flaky convertParamOfJsonStringTest in HttpTest (#7858)
---
 changes/en-us/2.x.md                                         |  1 +
 changes/zh-cn/2.x.md                                         |  1 +
 .../java/org/apache/seata/integration/http/HttpTest.java     | 12 ++++++++----
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md
index 48e6d029ce..d9b0327996 100644
--- a/changes/en-us/2.x.md
+++ b/changes/en-us/2.x.md
@@ -139,6 +139,7 @@ Add changes here for all PR submitted to the 2.x branch.
 - [[#7808](https://github.com/apache/incubator-seata/pull/7808)] Deflake 
multiple Insert Executor tests by fixing order-dependent primary key (PK) value 
comparison
 - [[#7815](https://github.com/apache/incubator-seata/pull/7815)] test: fix 
combine test to avoid failure due to ordering
 - [[#7827](https://github.com/apache/incubator-seata/pull/7827)] Fix 
non-deteriministic in TableMetaTest#testGetPrimaryKeyOnlyName
+- [[#7858](https://github.com/apache/incubator-seata/pull/7858)] Fix flakiness 
in HttpTest.convertParamOfJsonStringTest caused by non-deterministic Map 
iteration order
 
 
 ### refactor:
diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md
index 4b4d087424..4773516307 100644
--- a/changes/zh-cn/2.x.md
+++ b/changes/zh-cn/2.x.md
@@ -138,6 +138,7 @@
 - [[#7808](https://github.com/apache/incubator-seata/pull/7808)] 修复多个 Insert 
Executor 单测中因主键值比较顺序导致的间歇性失败问题
 - [[#7815](https://github.com/apache/incubator-seata/pull/7815)] 
通过合并测试来修复,避免因执行顺序导致的失败
 - [[#7827](https://github.com/apache/incubator-seata/pull/7827)] 修复 
TableMetaTest 中因主键名称列表顺序不稳定导致的单测间歇性失败问题
+- [[#7858](https://github.com/apache/incubator-seata/pull/7858)] 修复 
`HttpTest.convertParamOfJsonStringTest` 因 Map 遍历顺序不确定导致的测试用例间歇性失败问题
 
 
 ### refactor:
diff --git 
a/extensions/rpc/seata-http/src/test/java/org/apache/seata/integration/http/HttpTest.java
 
b/extensions/rpc/seata-http/src/test/java/org/apache/seata/integration/http/HttpTest.java
index 35e4aba470..52d75afbb3 100644
--- 
a/extensions/rpc/seata-http/src/test/java/org/apache/seata/integration/http/HttpTest.java
+++ 
b/extensions/rpc/seata-http/src/test/java/org/apache/seata/integration/http/HttpTest.java
@@ -206,13 +206,17 @@ class HttpTest {
 
     @Test
     void convertParamOfJsonStringTest() {
-
-        String targetParam = "{name=zhangsan, age=15}";
         String str = "{\n" + "    \"name\":\"zhangsan\",\n" + "    
\"age\":15\n" + "}";
+
+        Map<String, String> expected = new HashMap<>();
+        expected.put("name", "zhangsan");
+        expected.put("age", "15");
+
         Map<String, String> map = convertParamOfJsonString(str, Person.class);
-        Assertions.assertEquals(map.toString(), targetParam);
+        Assertions.assertEquals(expected, map);
+
         Person person = JSON.parseObject(str, Person.class);
         map = convertParamOfBean(person);
-        Assertions.assertEquals(map.toString(), targetParam);
+        Assertions.assertEquals(expected, map);
     }
 }


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

Reply via email to