зеркало из https://github.com/microsoft/CCF.git
Allow longer for e2e_batched timeout (#1432)
This commit is contained in:
Родитель
a5e923a297
Коммит
ae75a6f9ca
|
@ -107,15 +107,23 @@ def run_to_destruction(args):
|
|||
network = test(network, args, batch_size=10, write_size_multiplier=wsm)
|
||||
wsm += 5000
|
||||
except Exception as e:
|
||||
sleep_time = 3
|
||||
timeout = 10
|
||||
|
||||
LOG.info("Large write set caused an exception, as expected")
|
||||
LOG.info(f"Exception was: {e}")
|
||||
LOG.info(f"Waiting {sleep_time}s for node to terminate")
|
||||
LOG.info(f"Polling for {timeout}s for node to terminate")
|
||||
|
||||
time.sleep(sleep_time)
|
||||
assert (
|
||||
network.nodes[0].remote.remote.proc.poll() is not None
|
||||
), "Primary should have been terminated"
|
||||
end_time = time.time() + timeout
|
||||
while time.time() < end_time:
|
||||
time.sleep(0.1)
|
||||
exit_code = network.nodes[0].remote.remote.proc.poll()
|
||||
if exit_code is not None:
|
||||
LOG.info(f"Node terminated with exit code {exit_code}")
|
||||
assert exit_code != 0
|
||||
break
|
||||
|
||||
if time.time() > end_time:
|
||||
raise TimeoutError(f"Node took longer than {end_time}s to terminate")
|
||||
|
||||
network.ignore_errors_on_shutdown()
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче