Crazylychee commented on code in PR #9440:
URL: https://github.com/apache/rocketmq/pull/9440#discussion_r2125890016
##########
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:
Moreover, this configuration acquisition does not really need to find the
file with the corresponding path, but is converted into a string for display on
the management side. I verified the effect and the result is correct after
escaping.

--
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]