inspect_dht_record python binding fix and integration test fix

This commit is contained in:
Christien Rioux 2024-06-28 22:31:35 +00:00
parent be11b4543c
commit 0b0d9b5291
2 changed files with 12 additions and 3 deletions

View File

@ -4,6 +4,7 @@ import veilid
import pytest
import asyncio
import json
import time
import os
from . import *
from .api import VeilidTestConnectionError, api_connector
@ -386,10 +387,18 @@ async def test_dht_integration_writer_reader():
records.append(desc)
await rc0.set_dht_value(desc.key, 0, TEST_DATA)
await rc0.close_dht_record(desc.key)
print(f' {n}')
print(f'syncing records to the network')
for desc0 in records:
while True:
rr = await rc0.inspect_dht_record(desc0.key, [])
if len(rr.offline_subkeys) == 0:
await rc0.close_dht_record(desc0.key)
break
time.sleep(0.1)
# read dht records on server 1
print(f'reading {COUNT} records')
n=0

View File

@ -394,7 +394,7 @@ class DHTRecordReport:
network_seqs: list[ValueSeqNum],
):
self.subkeys = subkeys
self.offline_subkey = offline_subkeys
self.offline_subkeys = offline_subkeys
self.local_seqs = local_seqs
self.network_seqs = network_seqs