mirror of
https://gitlab.com/veilid/veilid.git
synced 2026-01-06 01:55:27 -05:00
[ci skip] fix bugs
This commit is contained in:
parent
9025ab0428
commit
d24145ccd3
10 changed files with 79 additions and 89 deletions
|
|
@ -925,7 +925,7 @@ async def test_dht_transaction_write_read_full_parallel_local():
|
|||
async with cs:
|
||||
|
||||
# Number of records
|
||||
COUNT = 8
|
||||
COUNT = 48
|
||||
# Number of subkeys per record
|
||||
SUBKEY_COUNT = 32
|
||||
# BareNonce to encrypt test data
|
||||
|
|
@ -947,7 +947,7 @@ async def test_dht_transaction_write_read_full_parallel_local():
|
|||
records.append(desc)
|
||||
|
||||
# Make encrypted data that is consistent and hard to compress
|
||||
subkey_data = bytes(chr(ord("A")+n)*MAX_SUBKEY_SIZE, 'ascii')
|
||||
subkey_data = bytes(chr(ord("A")+n%32)*MAX_SUBKEY_SIZE, 'ascii')
|
||||
subkey_data = await cs.crypt_no_auth(subkey_data, NONCE, SECRET)
|
||||
subkey_data_list.append(subkey_data)
|
||||
|
||||
|
|
@ -964,7 +964,15 @@ async def test_dht_transaction_write_read_full_parallel_local():
|
|||
|
||||
async def setter(key: RecordKey, subkey: ValueSubkey, data: bytes):
|
||||
start = time.time()
|
||||
await transaction.set(key, subkey, data)
|
||||
cnt = 0
|
||||
while True:
|
||||
try:
|
||||
await transaction.set(key, subkey, data)
|
||||
break
|
||||
except veilid.VeilidAPIErrorTryAgain:
|
||||
cnt += 1
|
||||
print(f' retry #{cnt} setting {key} #{subkey}')
|
||||
continue
|
||||
print(f'set {key} #{subkey}: {time.time()-start}')
|
||||
|
||||
init_set_futures.add(setter(key, ValueSubkey(i), subkey_data))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue