mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-11-10 12:29:49 +03:00
allow more sqlite thread safety than the minimum we require (#14215)
https://docs.python.org/3.11/library/sqlite3.html#sqlite3.threadsafety extracted from https://github.com/Chia-Network/chia-blockchain/pull/11407
This commit is contained in:
parent
3056db616c
commit
6e315e147a
@ -28,7 +28,7 @@ log = logging.getLogger(__name__)
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_block_store(tmp_dir, db_version, bt):
|
||||
assert sqlite3.threadsafety == 1
|
||||
assert sqlite3.threadsafety >= 1
|
||||
blocks = bt.get_consecutive_blocks(10)
|
||||
|
||||
async with DBConnection(db_version) as db_wrapper, DBConnection(db_version) as db_wrapper_2:
|
||||
@ -282,7 +282,7 @@ async def test_get_generator(bt, db_version):
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_get_blocks_by_hash(tmp_dir, bt, db_version):
|
||||
assert sqlite3.threadsafety == 1
|
||||
assert sqlite3.threadsafety >= 1
|
||||
blocks = bt.get_consecutive_blocks(10)
|
||||
|
||||
async with DBConnection(db_version) as db_wrapper, DBConnection(db_version) as db_wrapper_2:
|
||||
@ -320,7 +320,7 @@ async def test_get_blocks_by_hash(tmp_dir, bt, db_version):
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_get_block_bytes_in_range(tmp_dir, bt, db_version):
|
||||
assert sqlite3.threadsafety == 1
|
||||
assert sqlite3.threadsafety >= 1
|
||||
blocks = bt.get_consecutive_blocks(10)
|
||||
|
||||
async with DBConnection(db_version) as db_wrapper_2:
|
||||
|
Loading…
Reference in New Issue
Block a user