Skip to content

Commit 50f929f

Browse files
committed
bump jdbc 0.4.1
1 parent 89ccfbb commit 50f929f

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

tests/nox/java_client/prepare.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,37 @@ def download_jdbc(version):
2929
resp.raise_for_status()
3030
target.write_bytes(resp.content)
3131

32-
3332
def create_user():
3433
requests.post(
3534
"http://localhost:8000/v1/query/",
3635
auth=HTTPBasicAuth("root", ""),
3736
headers={"Content-Type": "application/json"},
38-
json={"sql": "CREATE USER IF NOT EXISTS databend IDENTIFIED BY 'databend'"},
37+
json={"sql": "DROP USER IF EXISTS databend"},
3938
).raise_for_status()
4039
requests.post(
4140
"http://localhost:8000/v1/query/",
4241
auth=HTTPBasicAuth("root", ""),
4342
headers={"Content-Type": "application/json"},
44-
json={"sql": "GRANT ALL ON *.* TO databend"},
43+
json={"sql": "CREATE USER IF NOT EXISTS databend IDENTIFIED BY 'databend' with default_role='test_jdbc'"},
44+
).raise_for_status()
45+
requests.post(
46+
"http://localhost:8000/v1/query/",
47+
auth=HTTPBasicAuth("root", ""),
48+
headers={"Content-Type": "application/json"},
49+
json={"sql": "CREATE ROLE IF NOT EXISTS test_jdbc"},
50+
).raise_for_status()
51+
requests.post(
52+
"http://localhost:8000/v1/query/",
53+
auth=HTTPBasicAuth("root", ""),
54+
headers={"Content-Type": "application/json"},
55+
json={"sql": "GRANT ALL ON *.* TO ROLE test_jdbc"},
56+
).raise_for_status()
57+
requests.post(
58+
"http://localhost:8000/v1/query/",
59+
auth=HTTPBasicAuth("root", ""),
60+
headers={"Content-Type": "application/json"},
61+
json={"sql": "GRANT ROLE test_jdbc TO USER databend"},
4562
).raise_for_status()
46-
4763

4864
def download_testng():
4965
urls = [

tests/nox/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def python_client(session, driver_version):
2222
session.run("behave", "tests/cursor", env=env)
2323

2424

25-
JDBC_DRIVER = ["0.4.0", "main"]
25+
JDBC_DRIVER = ["0.4.1", "main"]
2626

2727

2828
@nox.session

0 commit comments

Comments
 (0)