diff --git a/tests/suites/1_stateful/09_http_handler/09_0007_token.py b/tests/suites/1_stateful/09_http_handler/09_0007_token.py index 296e8e04d0834..9f5b302381f87 100755 --- a/tests/suites/1_stateful/09_http_handler/09_0007_token.py +++ b/tests/suites/1_stateful/09_http_handler/09_0007_token.py @@ -117,10 +117,10 @@ def fake_expired_token(ty): "sid": "", } return ( - "bend-v1-" - + ty - + "-" - + base64.b64encode(json.dumps(expired_claim).encode("utf-8")).decode("utf-8") + "bend-v1-" + + ty + + "-" + + base64.b64encode(json.dumps(expired_claim).encode("utf-8")).decode("utf-8") ) @@ -130,13 +130,12 @@ def main(): session_token = login_resp.get("session_token") refresh_token = login_resp.get("refresh_token") # print(session_token) - return # ok query_resp = do_query("select 1", session_token) pprint(query_resp.get("data")) pprint(query_resp.get("session").get("need_sticky")) - pprint(query_resp.get("session").get("need_refresh")) + pprint(query_resp.get("session").get("need_keep_alive")) # cluster query_resp = do_query("select count(*) from system.clusters", session_token) @@ -150,11 +149,11 @@ def main(): # temp table query_resp = do_query("CREATE TEMP TABLE t(c1 int)", session_token) pprint(query_resp.get("session").get("need_sticky")) - pprint(query_resp.get("session").get("need_refresh")) + pprint(query_resp.get("session").get("need_keep_alive")) query_resp = do_query("drop TABLE t", session_token) pprint(query_resp.get("session").get("need_sticky")) - pprint(query_resp.get("session").get("need_refresh")) + pprint(query_resp.get("session").get("need_keep_alive")) # errors do_query("select 2", "xxx") @@ -191,7 +190,8 @@ def main(): if __name__ == "__main__": + import logging try: main() except Exception as e: - print(f"An error occurred: {e}") + logging.exception(f"An error occurred: {e}") diff --git a/tests/suites/1_stateful/09_http_handler/09_0007_token.result b/tests/suites/1_stateful/09_http_handler/09_0007_token.result index 272886f43a277..6af46b4027526 100644 --- a/tests/suites/1_stateful/09_http_handler/09_0007_token.result +++ b/tests/suites/1_stateful/09_http_handler/09_0007_token.result @@ -1,15 +1,15 @@ ---- do_login() 200 -['session_token_ttl_in_secs', - 'refresh_token', +['refresh_token', 'session_id', 'session_token', + 'session_token_ttl_in_secs', 'version'] ---- do_query('select 1',) 200 [['1']] False -True +False ---- do_query('select count(*) from system.clusters',) 200 ---- do_query("select 'cluster'",) @@ -22,7 +22,7 @@ True ---- do_query('drop TABLE t',) 200 False -True +False ---- do_query('select 2',) 401 {'code': 5100, 'message': 'jwt auth not configured.'} @@ -39,7 +39,7 @@ True {'code': 5100, 'message': 'wrong data token type'} ---- do_refresh(1,) 200 -['session_token_ttl_in_secs', 'refresh_token', 'session_token'] +['refresh_token', 'session_token', 'session_token_ttl_in_secs'] ---- do_query('select 6',) 200 [['6']]