Skip to content

Commit c10b12f

Browse files
committed
fix(tests): increase HNSW timeout to 900s under sanitizers
TSAN adds 5-10x overhead, causing 300s timeout to be exceeded.
1 parent f59d585 commit c10b12f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/meson.build

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,14 @@ test_hnsw = executable(
4747
dependencies: [sqlite3_dep],
4848
)
4949

50+
# Detect if sanitizers are enabled (TSAN/ASAN add significant overhead)
51+
# Meson doesn't expose b_sanitize directly, so we check compiler args
52+
is_sanitized = get_option('b_sanitize') != 'none'
53+
hnsw_timeout = is_sanitized ? 900 : 300
54+
5055
test('Concepts and VectorView', test_concepts)
5156
test('Distance Metrics', test_distances)
5257
test('Utilities (Array)', test_utils)
5358
test('SQLite Functions (Comprehensive)', test_sqlite_functions, timeout: 60)
5459
test('Batch Distance Operations', test_batch_distance)
55-
test('HNSW Index', test_hnsw, timeout: 300)
60+
test('HNSW Index', test_hnsw, timeout: hnsw_timeout)

0 commit comments

Comments
 (0)