Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PBM fix for the tests with external backup #222

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion pbm-functional/pytest/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,10 +852,19 @@ def external_backup_copy(self, name):

def external_backup_finish(self, name):
n = testinfra.get_host("docker://" + self.pbm_cli)
result = n.check_output("pbm backup-finish " + name + " -o json")
result = n.check_output("pbm backup-finish " + name)
Cluster.log("External backup finished: " + result)

def external_restore_start(self):
timeout = time.time() + 60
while True:
if not self.get_status()['running']:
break
if time.time() > timeout:
assert False, "Cannot start restore, another operation running: " + self.get_status()['running']
time.sleep(1)
Cluster.log("Restore started")

if self.layout == "sharded":
client = pymongo.MongoClient(self.connection)
result = client.admin.command("balancerStop")
Expand Down
Loading