Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqlLineArgsTest: testConnectWithDbProperty and testConnectWithDbPropertyAsParameter2 are locale-dependent #154

Closed
vlsi opened this issue Sep 18, 2018 · 3 comments

Comments

@vlsi
Copy link

vlsi commented Sep 18, 2018

  1. The tests are locale-dependent, and they look for presence of Error: which apparently never happens in Russian locale
  2. h2-1.4.191.jar has a bug which is manifested as "garbage in the translated messages". In other words, it prints garbage rather than proper messages. Please upgrade h2 as well.
Failed tests:
  SqlLineArgsTest.testConnectWithDbProperty:1165
Expected: a string containing "Error: Hexadecimal string contains non-hex character: \"nonEmptyPasswd\" [90004-191] (state=90004,code=90004)"
     but: was "sqlline version ???
1/1          !set maxwidth 80
1/1          !connect "jdbc:h2:mem: ;PASSWORD_HASH=TRUE" sa "nonEmptyPasswd"
Error: Ше�тнадцатирична� �трока �одержит неше�тнадцатиричные �имволы: "nonEmptyPasswd"
Hexadecimal string contains non-hex character: "nonEmptyPasswd" [90004-191] (state=90004,code=90004)
Aborting command set because "force" is false and command failed: "!connect "jdbc:h2:mem: ;PASSWORD_HASH=TRUE" sa "nonEmptyPasswd""
"
  SqlLineArgsTest.testConnectWithDbPropertyAsParameter2:1126
Expected: a string containing "Error: Literals of this kind are not allowed; SQL statement:"
     but: was "sqlline version ???
1/1          !set maxwidth 80
1/1          !connect  -p PASSWORD_HASH TRUE -p ALLOW_LITERALS NONE jdbc:h2:mem: sa 6e6f6e456d707479506173737764
1/1          select 1;
Error: Вычи�ление литералов запрещено
Literals of this kind are not allowed; SQL statement:
select 1 [90116-191] (state=90116,code=90116)
Aborting command set because "force" is false and command failed: "select 1;"
@snuyanzin
Copy link
Collaborator

As I understand committed at f4bfb5c with adding forbiddenapis and fixing all the errors based on its report

@snuyanzin
Copy link
Collaborator

cc @julianhyde
If I am not mistaken it could closed as fixed

@julianhyde
Copy link
Owner

Fixed in f4bfb5c; thanks for reminding me, @snuyanzin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants