slinkydeveloper commented on a change in pull request #18874:
URL: https://github.com/apache/flink/pull/18874#discussion_r812012064
##########
File path:
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/operations/SqlToOperationConverterTest.java
##########
@@ -1660,6 +1665,65 @@ public void testReset() {
assertThat(((ResetOperation)
operation2).getKey()).hasValue("test-key");
}
+ @Test
+ public void testHelpCommands() {
+ ExtendedParser extendedParser = new ExtendedParser();
+ Stream.of("HELP", "HELP;", "HELP ;", "HELP\t;", "HELP\n;")
+ .forEach(
+ command -> {
+ Operation operation1 =
+ extendedParser
+ .parse(command)
+ .orElseThrow(
+ () ->
+ new
RuntimeException(
+ "Fail to
parse '"
+ +
command
+ +
"'"));
+
assertThat(operation1).isInstanceOf(HelpOperation.class);
+ });
+ }
+
+ @Test
+ public void testClearCommands() {
+ ExtendedParser extendedParser = new ExtendedParser();
+ Stream.of("CLEAR", "CLEAR;", "CLEAR ;", "CLEAR\t;", "CLEAR\n;")
+ .forEach(
+ command -> {
+ Operation operation1 =
+ extendedParser
+ .parse(command)
+ .orElseThrow(
+ () ->
+ new
RuntimeException(
+ "Fail to
parse '"
+ +
command
+ +
"'"));
+
assertThat(operation1).isInstanceOf(ClearOperation.class);
+ });
+ }
+
+ @Test
+ public void testQuitCommands() {
+ ExtendedParser extendedParser = new ExtendedParser();
+ Stream.of(
Review comment:
I gave a quick look to this class, porting to junit5 should be as easy
as just replacing the imports. Also, I think it's possible for JUnit 4 and 5 to
coexist in the same class (but i'm not 100% sure)
--
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]