[ISSUE #4995] Fix test case:BrokerPathConfigHelperTest#testGetLmqConsumerOffsetPath (#4996)

This commit is contained in:
mxsm
2022-09-05 08:36:12 +08:00
committed by GitHub
parent a3e54fcb1b
commit 2cc3f462b3
@@ -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);
}
}