Crazylychee commented on code in PR #9440:
URL: https://github.com/apache/rocketmq/pull/9440#discussion_r2125875412


##########
common/src/test/java/org/apache/rocketmq/common/MixAllTest.java:
##########
@@ -85,4 +85,43 @@ public void testIsLmq() {
         testLmq = "%LMQ%GID_TEST";
         assertThat(MixAll.isLmq(testLmq)).isTrue();
     }
+
+    @Test
+    public void testAdjustConfigForPlatform_OnWindows() {
+        if (MixAll.isWindows()) {
+            String configWithSingleBackslash = 
"data\\path\\config\\file.properties";
+            String adjusted = 
MixAll.adjustConfigForPlatform(configWithSingleBackslash);
+            
assertThat(adjusted).isEqualTo("data\\\\path\\\\config\\\\file.properties");

Review Comment:
   It is like this: the characters are displayed normally only after 
replacement. If they are not replaced, \ will be interpreted as an escape 
character, resulting in an error and failure to obtain the broker configuration.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to