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

zrlw pushed a commit to branch 3.3
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.3 by this push:
     new 400b6e200d Stabilize the test 
ConfigManagerTest.testGetConfigByIdOrName() (#15758)
400b6e200d is described below

commit 400b6e200d29498137a11dfc6cdaf75de47f6e4d
Author: Anshul Bisht <[email protected]>
AuthorDate: Sun Nov 9 20:10:12 2025 -0600

    Stabilize the test ConfigManagerTest.testGetConfigByIdOrName() (#15758)
---
 .../dubbo/config/context/ConfigManagerTest.java       | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git 
a/dubbo-common/src/test/java/org/apache/dubbo/config/context/ConfigManagerTest.java
 
b/dubbo-common/src/test/java/org/apache/dubbo/config/context/ConfigManagerTest.java
index d51d43a1e9..74121b9b49 100644
--- 
a/dubbo-common/src/test/java/org/apache/dubbo/config/context/ConfigManagerTest.java
+++ 
b/dubbo-common/src/test/java/org/apache/dubbo/config/context/ConfigManagerTest.java
@@ -410,11 +410,20 @@ class ConfigManagerTest {
             Assertions.fail();
         } catch (Exception e) {
             Assertions.assertTrue(e instanceof IllegalStateException);
-            Assertions.assertEquals(
-                    e.getMessage(),
-                    "Found more than one config by name: dubbo, instances: "
-                            + "[<dubbo:protocol port=\"9103\" name=\"dubbo\" 
/>, <dubbo:protocol name=\"dubbo\" />]. "
-                            + "Please remove redundant configs or get config 
by id.");
+            String msg = e.getMessage();
+
+            Assertions.assertTrue(
+                    msg.startsWith("Found more than one config by name: dubbo, 
instances: "),
+                    "Unexpected message prefix: " + msg);
+            Assertions.assertTrue(
+                    msg.contains("<dubbo:protocol port=\"9103\" name=\"dubbo\" 
/>"),
+                    "Message should mention protocol with port 9103: " + msg);
+            Assertions.assertTrue(
+                    msg.contains("<dubbo:protocol name=\"dubbo\" />"),
+                    "Message should mention protocol with default port: " + 
msg);
+            Assertions.assertTrue(
+                    msg.endsWith("Please remove redundant configs or get 
config by id."),
+                    "Unexpected message suffix: " + msg);
         }
 
         ModuleConfig moduleConfig = new ModuleConfig();

Reply via email to