Skip to content

Commit 1473ab1

Browse files
committed
skip test with ruby-asan
1 parent 099fd5c commit 1473ab1

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

test/duckdb_test/appender_test.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,12 @@ def test_s_new_with_schema
4949
@con.execute('CREATE SCHEMA a; CREATE TABLE a.b (id INT);')
5050
appender = DuckDB::Appender.new(@con, 'a', 'b')
5151
assert_instance_of(DuckDB::Appender, appender)
52+
end
5253

53-
assert_raises(DuckDB::Error) { appender = DuckDB::Appender.new(@con, 'b', 'b') }
54+
def test_s_new_with_invalid_schema
55+
skip('test with ASAN') if ENV['ASAN_TEST'] == '1'
56+
@con.execute('CREATE SCHEMA a; CREATE TABLE a.b (id INT);')
57+
assert_raises(DuckDB::Error) { DuckDB::Appender.new(@con, 'b', 'b') }
5458
end
5559

5660
def sub_test_append_column2(method, type, values:, expected:)

test/duckdb_test/config_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def test_set_config_with_exception
5353
end
5454

5555
def test_set_invalid_option
56+
skip 'test with ASAN' if ENV['ASAN_TEST'] == '1'
5657
config = DuckDB::Config.new
5758
assert_instance_of(DuckDB::Config, config.set_config('aaa_invalid_option', 'READ_ONLY'))
5859
assert_raises(DuckDB::Error) do

test/duckdb_test/connection_test.rb

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def test_async_query_with_valid_hash_params
7979
end
8080

8181
def test_async_query_with_invalid_params
82+
skip 'test with ASAN' if ENV['ASAN_TEST'] == '1'
8283
assert_raises(DuckDB::Error) { @con.async_query('foo', 'bar') }
8384

8485
assert_raises(ArgumentError) { @con.async_query }
@@ -178,11 +179,15 @@ def test_query_progress
178179
"QueryProgress: total_rows_to_process(#{total_rows_to_process}) to be >= rows_processed(#{rows_processed})"
179180
)
180181

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')
182+
if ENV['ASAN_TEST'].nil?
183+
# test interrupt
184+
@con.interrupt
185+
while pending_result.state == :not_ready
186+
pending_result.execute_task
187+
assert(pending_result.state != :ready, 'pending_result.state should not be :ready')
188+
end
189+
else
190+
skip 'test with ASAN'
186191
end
187192
end
188193

test/duckdb_test/prepared_statement_test.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ def test_s_new
102102
assert_raises(ArgumentError) { DuckDB::PreparedStatement.new }
103103
assert_raises(TypeError) { DuckDB::PreparedStatement.new(@con, 1) }
104104
assert_raises(TypeError) { DuckDB::PreparedStatement.new(1, 1) }
105+
end
106+
107+
def test_s_new_with_duckdb_error
108+
skip 'test with ASAN' if ENV['ASAN_TEST'] == '1'
105109
assert_raises(DuckDB::Error) { DuckDB::PreparedStatement.new(@con, 'SELECT * FROM') }
106110
end
107111

@@ -153,6 +157,7 @@ def test_param_type
153157
end
154158

155159
def test_clear_bindings
160+
skip 'test with ASAN' if ENV['ASAN_TEST'] == '1'
156161
stmt = DuckDB::PreparedStatement.new(@con, 'SELECT * FROM a WHERE id = $1')
157162
stmt.bind(1, 1)
158163
stmt.clear_bindings

0 commit comments

Comments
 (0)