File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed
Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ def write_and_query_with_explicit_sys_cert(conf):
7878 lp = f"escooter,id=zx80 speed=3.14,ticks=42i { now - (10 * 1_000_000_000 )} "
7979 _client .write (lp )
8080
81- query = "SELECT * FROM \" escooter\" "
81+ query = "SELECT * FROM \" escooter\" ORDER BY time DESC "
8282 reader : pyarrow .Table = _client .query (query , mode = "" )
8383 print_results (reader .to_pylist ())
8484
@@ -95,7 +95,7 @@ def query_with_verify_ssl_off(conf, cert):
9595 ssl_ca_cert = cert ,
9696 verify_ssl = False ) as _client :
9797
98- query = "SELECT * FROM \" escooter\" "
98+ query = "SELECT * FROM \" escooter\" ORDER BY time DESC "
9999 reader : pyarrow .Table = _client .query (query , mode = "" )
100100 print_results (reader .to_pylist ())
101101
Original file line number Diff line number Diff line change @@ -167,11 +167,12 @@ def __init__(
167167 connection_string = f"grpc+tcp://{ hostname } :{ port } "
168168
169169 q_opts_builder = QueryApiOptionsBuilder ()
170- if kwargs .keys ().__contains__ ('ssl_ca_cert' ):
170+ kw_keys = kwargs .keys ()
171+ if kw_keys .__contains__ ('ssl_ca_cert' ):
171172 q_opts_builder .root_certs (kwargs .get ('ssl_ca_cert' , None ))
172- if kwargs . keys () .__contains__ ('verify_ssl' ):
173+ if kw_keys .__contains__ ('verify_ssl' ):
173174 q_opts_builder .tls_verify (kwargs .get ('verify_ssl' , True ))
174- if kwargs . keys () .__contains__ ('proxy' ):
175+ if kw_keys .__contains__ ('proxy' ):
175176 q_opts_builder .proxy (kwargs .get ('proxy' , None ))
176177 self ._query_api = _QueryApi (connection_string = connection_string , token = token ,
177178 flight_client_options = flight_client_options ,
Original file line number Diff line number Diff line change 99
1010class QueryApiOptions (object ):
1111 tls_root_certs = None
12- tls_verify = True
12+ tls_verify = None
1313 proxy = None
1414 flight_client_options = None
1515
@@ -94,7 +94,8 @@ def __init__(self,
9494 self ._flight_client_options ["tls_root_certs" ] = options .tls_root_certs
9595 if options .proxy :
9696 self ._proxy = options .proxy
97- self ._flight_client_options ["disable_server_verification" ] = not options .tls_verify
97+ if options .tls_verify is not None :
98+ self ._flight_client_options ["disable_server_verification" ] = not options .tls_verify
9899 self ._flight_client_options ["generic_options" ] = [
99100 ("grpc.secondary_user_agent" , USER_AGENT )
100101 ]
Original file line number Diff line number Diff line change @@ -216,7 +216,6 @@ def test_query_api_options_builder(self):
216216 .tls_verify (False )\
217217 .build ()
218218
219- print (f"\n DEBUG options { vars (options )} " )
220219 try :
221220 assert options .tls_root_certs .decode ('utf-8' ) == self .sample_cert
222221 assert not options .tls_verify
@@ -243,7 +242,6 @@ def test_query_client_with_options(self):
243242 options
244243 )
245244
246- print (f"\n DEBUG client { vars (client )} " )
247245 try :
248246 assert client ._token == token
249247 assert client ._flight_client_options ['tls_root_certs' ].decode ('utf-8' ) == self .sample_cert
You can’t perform that action at this time.
0 commit comments