Skip to content

Commit

Permalink
respect beeline verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
lsm1 committed Feb 28, 2024
1 parent 95dda6a commit fd9c925
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ protected void processOption(String arg, ListIterator iter) throws ParseExceptio
};
cl = beelineParser.parse(options, args);

if (getOpts().getVerbose()) {
ignoreLaunchEngine = false;
}

connSuccessful =
DynMethods.builder("connectUsingArgs")
.hiddenImpl(BeeLine.class, BeelineParser.class, CommandLine.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.apache.hive.beeline;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import java.io.IOException;
Expand Down Expand Up @@ -104,7 +105,13 @@ public void testKyuubiBeelineIgnoreLaunchEngine() {

String[] args3 = {"-u", "badUrl"};
kyuubiBeeLine.initArgs(args3);
assertTrue(!kyuubiBeeLine.isIgnoreLaunchEngine());
assertFalse(kyuubiBeeLine.isIgnoreLaunchEngine());
kyuubiBeeLine.setIgnoreLaunchEngine(false);

String[] args4 = {"--ignore-launch-engine", "--verbose", "-f", "test.sql"};
kyuubiBeeLine.initArgs(args4);
assertFalse(kyuubiBeeLine.isIgnoreLaunchEngine());
assert kyuubiBeeLine.getOpts().getScriptFile().equals("test.sql");
kyuubiBeeLine.setIgnoreLaunchEngine(false);
}

Expand Down

0 comments on commit fd9c925

Please sign in to comment.