Skip to content

Commit

Permalink
PBM fix for the tests with external backup (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
olexandr-havryliak authored Sep 18, 2024
1 parent 6667284 commit 65ff8ae
Showing 1 changed file with 10 additions and 1 deletion.
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

0 comments on commit 65ff8ae

Please sign in to comment.