Skip to content

Commit 2e1adc0

Browse files
zahariashclaude
authored andcommitted
test(timeout): give the settings tests' database the suite's 1 GiB max_db_size
On the C-API backend, every test_timeout.py test that uses the conn fixture failed at random in setup with "Buffer manager exception: Mmap for size 8796093022208 failed." The fixture opened lb.Database(":memory:") with the default max_db_size, which reserves 8 TiB of address space. By then 14 default-size databases from test_fsm.py, test_database.py and test_exception.py are still mapped, because the C-API Database frees its native database only in close() or at exit. The rest of the 128 TiB is often split into gaps smaller than 8 TiB. The fixture now passes max_db_size like the conftest's databases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 49837b1 commit 2e1adc0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎test/test_timeout.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ def _interrupt_until_done(conn: lb.Connection, *threads: threading.Thread) -> No
4040

4141

4242
@pytest.fixture
43-
def conn() -> Iterator[lb.Connection]:
43+
def conn(max_db_size: int) -> Iterator[lb.Connection]:
4444
# A fresh connection: the shared read-only one carries other tests' settings.
45-
db = lb.Database(":memory:")
45+
db = lb.Database(":memory:", max_db_size=max_db_size)
4646
conn = lb.Connection(db)
4747
yield conn
4848
conn.close()

0 commit comments

Comments
 (0)