Allow longer for e2e_batched timeout (#1432)

This commit is contained in:
Eddy Ashton 2020-07-23 15:37:29 +01:00 коммит произвёл GitHub
Родитель a5e923a297
Коммит ae75a6f9ca
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 14 добавлений и 6 удалений

Просмотреть файл

@ -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()