@@ -35,19 +35,22 @@ def test_query_with_valid_hash_params
3535 assert_equal ( 'a' , r . each . first [ 1 ] )
3636 end
3737
38- def test_query_with_invalid_params
39- assert_raises ( DuckDB ::Error ) { @con . query ( 'foo' , 'bar' ) }
40-
41- assert_raises ( ArgumentError ) { @con . query }
42-
43- assert_raises ( TypeError ) { @con . query ( 1 ) }
38+ def test_query_with_invalid_params_and_raise_duckdb_error
39+ skip 'test with ASAN' if ENV [ 'ASAN_TEST' ] == '1'
4440
41+ assert_raises ( DuckDB ::Error ) { @con . query ( 'foo' , 'bar' ) }
4542 assert_raises ( DuckDB ::Error ) do
4643 invalid_sql = 'CREATE TABLE table1 ('
4744 @con . query ( invalid_sql )
4845 end
4946 end
5047
48+ def test_query_with_invalid_params
49+ assert_raises ( ArgumentError ) { @con . query }
50+
51+ assert_raises ( TypeError ) { @con . query ( 1 ) }
52+ end
53+
5154 def test_async_query
5255 pending_result = @con . async_query ( 'CREATE TABLE table1 (id INTEGER)' )
5356 assert_instance_of ( DuckDB ::PendingResult , pending_result )
@@ -79,6 +82,7 @@ def test_async_query_with_valid_hash_params
7982 end
8083
8184 def test_async_query_with_invalid_params
85+ skip 'test with ASAN' if ENV [ 'ASAN_TEST' ] == '1'
8286 assert_raises ( DuckDB ::Error ) { @con . async_query ( 'foo' , 'bar' ) }
8387
8488 assert_raises ( ArgumentError ) { @con . async_query }
@@ -178,11 +182,15 @@ def test_query_progress
178182 "QueryProgress: total_rows_to_process(#{ total_rows_to_process } ) to be >= rows_processed(#{ rows_processed } )"
179183 )
180184
181- # test interrupt
182- @con . interrupt
183- while pending_result . state == :not_ready
184- pending_result . execute_task
185- assert ( pending_result . state != :ready , 'pending_result.state should not be :ready' )
185+ if ENV [ 'ASAN_TEST' ] . nil?
186+ # test interrupt
187+ @con . interrupt
188+ while pending_result . state == :not_ready
189+ pending_result . execute_task
190+ assert ( pending_result . state != :ready , 'pending_result.state should not be :ready' )
191+ end
192+ else
193+ skip 'test with ASAN'
186194 end
187195 end
188196
0 commit comments