[GitHub] [rocketmq] lizhanhui commented on a diff in pull request #5325: [ISSUE #5324]Replace deprecated class PosixParser with DefaultParser for CLI

2022-10-16 Thread GitBox


lizhanhui commented on code in PR #5325:
URL: https://github.com/apache/rocketmq/pull/5325#discussion_r996569990


##
test/src/main/java/org/apache/rocketmq/test/util/MQAdminTestUtils.java:
##
@@ -17,10 +17,15 @@
 
 package org.apache.rocketmq.test.util;
 
+import java.util.HashMap;

Review Comment:
   It will be OK if the sort is automatic



-- 
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: dev-unsubscr...@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [rocketmq] lizhanhui commented on a diff in pull request #5325: [ISSUE #5324]Replace deprecated class PosixParser with DefaultParser for CLI

2022-10-16 Thread GitBox


lizhanhui commented on code in PR #5325:
URL: https://github.com/apache/rocketmq/pull/5325#discussion_r996569634


##
tools/src/test/java/org/apache/rocketmq/tools/command/acl/UpdateAccessConfigSubCommandTest.java:
##
@@ -49,7 +49,7 @@ public void testExecute() {
 // Note: Posix parser is capable of handling values that contains '='.
 final CommandLine commandLine =
 ServerUtil.parseCmdLine("mqadmin " + cmd.commandName(), subargs,
-cmd.buildCommandlineOptions(options), new PosixParser());
+cmd.buildCommandlineOptions(options), new DefaultParser());

Review Comment:
   OK. Please look into the failed test case anyway.



-- 
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: dev-unsubscr...@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [rocketmq] lizhanhui commented on a diff in pull request #5325: [ISSUE #5324]Replace deprecated class PosixParser with DefaultParser for CLI

2022-10-16 Thread GitBox


lizhanhui commented on code in PR #5325:
URL: https://github.com/apache/rocketmq/pull/5325#discussion_r996547510


##
tools/src/test/java/org/apache/rocketmq/tools/command/acl/UpdateAccessConfigSubCommandTest.java:
##
@@ -49,7 +49,7 @@ public void testExecute() {
 // Note: Posix parser is capable of handling values that contains '='.
 final CommandLine commandLine =
 ServerUtil.parseCmdLine("mqadmin " + cmd.commandName(), subargs,
-cmd.buildCommandlineOptions(options), new PosixParser());
+cmd.buildCommandlineOptions(options), new DefaultParser());

Review Comment:
   See this failure case
   1) 
testExecute(org.apache.rocketmq.tools.command.acl.UpdateAccessConfigSubCommandTest)
   java.lang.SecurityException: Test code should never call System.exit()
at 
com.google.testing.junit.runner.util.GoogleTestSecurityManager.checkExit(GoogleTestSecurityManager.java:34)
at java.lang.Runtime.exit(Runtime.java:107)
at java.lang.System.exit(System.java:973)
at 
org.apache.rocketmq.srvutil.ServerUtil.parseCmdLine(ServerUtil.java:56)
at 
org.apache.rocketmq.tools.command.acl.UpdateAccessConfigSubCommandTest.testExecute(UpdateAccessConfigSubCommandTest.java:[51](https://github.com/apache/rocketmq/actions/runs/3255627851/jobs/5345142856#step:4:52))



-- 
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: dev-unsubscr...@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [rocketmq] lizhanhui commented on a diff in pull request #5325: [ISSUE #5324]Replace deprecated class PosixParser with DefaultParser for CLI

2022-10-16 Thread GitBox


lizhanhui commented on code in PR #5325:
URL: https://github.com/apache/rocketmq/pull/5325#discussion_r996547141


##
tools/src/test/java/org/apache/rocketmq/tools/command/acl/UpdateAccessConfigSubCommandTest.java:
##
@@ -49,7 +49,7 @@ public void testExecute() {
 // Note: Posix parser is capable of handling values that contains '='.
 final CommandLine commandLine =
 ServerUtil.parseCmdLine("mqadmin " + cmd.commandName(), subargs,
-cmd.buildCommandlineOptions(options), new PosixParser());
+cmd.buildCommandlineOptions(options), new DefaultParser());

Review Comment:
   DefaultParser cannot handle values that contain '='. Need to investigate if 
there is an option to overcome this issue.



-- 
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: dev-unsubscr...@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org