update-remaining time

This commit is contained in:
Ekaterina Chernitsyna 2023-11-02 19:18:31 +03:00 committed by Andrey Berezin
parent 1f50166e78
commit c8227e80af

View file

@ -180,7 +180,9 @@ class K6:
while timeout > 0:
if not self._k6_process.running():
return
logger.info(f"K6 is running. Waiting {wait_interval} seconds...")
remaining_time_hours = f"{timeout//3600}h" if timeout//3600 != 0 else ""
remaining_time_minutes = f"{timeout//60%60}m" if timeout//60%60 != 0 else ""
logger.info(f"K6 is running. Remaining time {remaining_time_hours}{remaining_time_minutes}{timeout%60}s. Next check after {wait_interval} seconds...")
sleep(wait_interval)
timeout -= min(timeout, wait_interval)
wait_interval = max(