@@ -180,10 +180,19 @@ def test_cloud_fetch(self):
180
180
181
181
182
182
class TestPySQLAsyncQueriesSuite (PySQLPytestTestCase ):
183
- def test_execute_async__long_running (self ):
183
+ @pytest .mark .parametrize (
184
+ "extra_params" ,
185
+ [
186
+ {},
187
+ {
188
+ "use_sea" : True ,
189
+ },
190
+ ],
191
+ )
192
+ def test_execute_async__long_running (self , extra_params ):
184
193
185
194
long_running_query = "SELECT COUNT(*) FROM RANGE(10000 * 16) x JOIN RANGE(10000) y ON FROM_UNIXTIME(x.id * y.id, 'yyyy-MM-dd') LIKE '%not%a%date%'"
186
- with self .cursor () as cursor :
195
+ with self .cursor (extra_params ) as cursor :
187
196
cursor .execute_async (long_running_query )
188
197
189
198
## Polling after every POLLING_INTERVAL seconds
@@ -226,7 +235,16 @@ def test_execute_async__small_result(self, extra_params):
226
235
227
236
assert result [0 ].asDict () == {"1" : 1 }
228
237
229
- def test_execute_async__large_result (self ):
238
+ @pytest .mark .parametrize (
239
+ "extra_params" ,
240
+ [
241
+ {},
242
+ {
243
+ "use_sea" : True ,
244
+ },
245
+ ],
246
+ )
247
+ def test_execute_async__large_result (self , extra_params ):
230
248
x_dimension = 1000
231
249
y_dimension = 1000
232
250
large_result_query = f"""
@@ -240,7 +258,7 @@ def test_execute_async__large_result(self):
240
258
RANGE({ y_dimension } ) y
241
259
"""
242
260
243
- with self .cursor () as cursor :
261
+ with self .cursor (extra_params ) as cursor :
244
262
cursor .execute_async (large_result_query )
245
263
246
264
## Fake sleep for 5 secs
@@ -348,6 +366,9 @@ def test_incorrect_query_throws_exception(self):
348
366
"use_cloud_fetch" : False ,
349
367
"enable_query_result_lz4_compression" : False ,
350
368
},
369
+ {
370
+ "use_sea" : True ,
371
+ }
351
372
],
352
373
)
353
374
def test_create_table_will_return_empty_result_set (self , extra_params ):
@@ -558,6 +579,9 @@ def test_get_catalogs(self):
558
579
"use_cloud_fetch" : False ,
559
580
"enable_query_result_lz4_compression" : False ,
560
581
},
582
+ {
583
+ "use_sea" : True ,
584
+ }
561
585
],
562
586
)
563
587
def test_get_arrow (self , extra_params ):
@@ -631,6 +655,9 @@ def execute_really_long_query():
631
655
"use_cloud_fetch" : False ,
632
656
"enable_query_result_lz4_compression" : False ,
633
657
},
658
+ {
659
+ "use_sea" : True ,
660
+ }
634
661
],
635
662
)
636
663
def test_can_execute_command_after_failure (self , extra_params ):
@@ -653,6 +680,9 @@ def test_can_execute_command_after_failure(self, extra_params):
653
680
"use_cloud_fetch" : False ,
654
681
"enable_query_result_lz4_compression" : False ,
655
682
},
683
+ {
684
+ "use_sea" : True ,
685
+ }
656
686
],
657
687
)
658
688
def test_can_execute_command_after_success (self , extra_params ):
@@ -677,6 +707,9 @@ def generate_multi_row_query(self):
677
707
"use_cloud_fetch" : False ,
678
708
"enable_query_result_lz4_compression" : False ,
679
709
},
710
+ {
711
+ "use_sea" : True ,
712
+ }
680
713
],
681
714
)
682
715
def test_fetchone (self , extra_params ):
@@ -721,6 +754,9 @@ def test_fetchall(self, extra_params):
721
754
"use_cloud_fetch" : False ,
722
755
"enable_query_result_lz4_compression" : False ,
723
756
},
757
+ {
758
+ "use_sea" : True ,
759
+ }
724
760
],
725
761
)
726
762
def test_fetchmany_when_stride_fits (self , extra_params ):
@@ -741,6 +777,9 @@ def test_fetchmany_when_stride_fits(self, extra_params):
741
777
"use_cloud_fetch" : False ,
742
778
"enable_query_result_lz4_compression" : False ,
743
779
},
780
+ {
781
+ "use_sea" : True ,
782
+ }
744
783
],
745
784
)
746
785
def test_fetchmany_in_excess (self , extra_params ):
@@ -761,6 +800,9 @@ def test_fetchmany_in_excess(self, extra_params):
761
800
"use_cloud_fetch" : False ,
762
801
"enable_query_result_lz4_compression" : False ,
763
802
},
803
+ {
804
+ "use_sea" : True ,
805
+ }
764
806
],
765
807
)
766
808
def test_iterator_api (self , extra_params ):
@@ -846,6 +888,9 @@ def test_timestamps_arrow(self):
846
888
"use_cloud_fetch" : False ,
847
889
"enable_query_result_lz4_compression" : False ,
848
890
},
891
+ {
892
+ "use_sea" : True ,
893
+ }
849
894
],
850
895
)
851
896
def test_multi_timestamps_arrow (self , extra_params ):
0 commit comments