Skip to content
Snippets Groups Projects
Commit 38a76846 authored by Yaroslav Dynnikov's avatar Yaroslav Dynnikov
Browse files

test: log more instance management events

parent d6c3027f
No related branches found
No related tags found
1 merge request!114Enhance pytest
Pipeline #5083 passed
......@@ -223,7 +223,8 @@ class Instance:
self.process.terminate()
try:
return self.process.wait(timeout=kill_after_seconds)
self.process.wait(timeout=kill_after_seconds)
eprint(f"{self} terminated")
finally:
self.kill()
......@@ -239,6 +240,8 @@ class Instance:
start_new_session=True,
)
eprint(f"{self} starting...")
# Assert a new process group is created
assert os.getpgid(self.process.pid) == self.process.pid
......@@ -283,6 +286,7 @@ class Instance:
status = self.__raft_status()
assert status.is_ready
self.raft_id = status.id
eprint(f"{self} is ready")
@funcy.retry(tries=4, timeout=0.1, errors=AssertionError)
def promote_or_fail(self):
......@@ -297,6 +301,7 @@ class Instance:
assert self.__raft_status() == "Leader"
wait_promoted()
eprint(f"{self} is a leader now")
@dataclass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment