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

jinrongtong pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new 2cc3f462b [ISSUE #4995] Fix test 
case:BrokerPathConfigHelperTest#testGetLmqConsumerOffsetPath (#4996)
2cc3f462b is described below

commit 2cc3f462b30c93bd7fa042a1f48b44f96af3037e
Author: mxsm <[email protected]>
AuthorDate: Mon Sep 5 08:36:12 2022 +0800

    [ISSUE #4995] Fix test 
case:BrokerPathConfigHelperTest#testGetLmqConsumerOffsetPath (#4996)
---
 .../rocketmq/broker/BrokerPathConfigHelperTest.java    | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git 
a/broker/src/test/java/org/apache/rocketmq/broker/BrokerPathConfigHelperTest.java
 
b/broker/src/test/java/org/apache/rocketmq/broker/BrokerPathConfigHelperTest.java
index 01e7c3659..3b2605408 100644
--- 
a/broker/src/test/java/org/apache/rocketmq/broker/BrokerPathConfigHelperTest.java
+++ 
b/broker/src/test/java/org/apache/rocketmq/broker/BrokerPathConfigHelperTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.rocketmq.broker;
 
+import java.io.File;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -25,18 +26,17 @@ public class BrokerPathConfigHelperTest {
 
     @Test
     public void testGetLmqConsumerOffsetPath() {
-        String lmqConsumerOffsetPath = 
BrokerPathConfigHelper.getLmqConsumerOffsetPath("/home/admin/store");
-        assertEquals("/home/admin/store/config/lmqConsumerOffset.json", 
lmqConsumerOffsetPath);
+        String lmqConsumerOffsetPath = 
BrokerPathConfigHelper.getLmqConsumerOffsetPath("/home/admin/store".replace("/",
 File.separator));
+        
assertEquals("/home/admin/store/config/lmqConsumerOffset.json".replace("/", 
File.separator), lmqConsumerOffsetPath);
 
+        String consumerOffsetPath = 
BrokerPathConfigHelper.getConsumerOffsetPath("/home/admin/store".replace("/", 
File.separator));
+        
assertEquals("/home/admin/store/config/consumerOffset.json".replace("/", 
File.separator), consumerOffsetPath);
 
-        String consumerOffsetPath = 
BrokerPathConfigHelper.getConsumerOffsetPath("/home/admin/store");
-        assertEquals("/home/admin/store/config/consumerOffset.json", 
consumerOffsetPath);
+        String topicConfigPath = 
BrokerPathConfigHelper.getTopicConfigPath("/home/admin/store".replace("/", 
File.separator));
+        assertEquals("/home/admin/store/config/topics.json".replace("/", 
File.separator), topicConfigPath);
 
-        String topicConfigPath = 
BrokerPathConfigHelper.getTopicConfigPath("/home/admin/store");
-        assertEquals("/home/admin/store/config/topics.json", topicConfigPath);
-
-        String subscriptionGroupPath = 
BrokerPathConfigHelper.getSubscriptionGroupPath("/home/admin/store");
-        assertEquals("/home/admin/store/config/subscriptionGroup.json", 
subscriptionGroupPath);
+        String subscriptionGroupPath = 
BrokerPathConfigHelper.getSubscriptionGroupPath("/home/admin/store".replace("/",
 File.separator));
+        
assertEquals("/home/admin/store/config/subscriptionGroup.json".replace("/", 
File.separator), subscriptionGroupPath);
 
     }
 }
\ No newline at end of file

Reply via email to