Skip to content

Commit 740d94a

Browse files
committed
Fix backup cancel test
1 parent f47a586 commit 740d94a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

integration_v3/test_backup_v4.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ def test_cancel_backup(client: weaviate.WeaviateClient) -> None:
475475
resp = client.backup.create(backup_id=backup_id, backend=BACKEND)
476476
assert resp.status == BackupStatus.STARTED
477477

478-
assert client.backup.cancel(backup_id=backup_id, backend=BACKEND)
478+
assert client.backup.cancel_backup(backup_id=backup_id, backend=BACKEND)
479479

480480
# async process
481481
start = time.time()
@@ -485,4 +485,5 @@ def test_cancel_backup(client: weaviate.WeaviateClient) -> None:
485485
break
486486
time.sleep(0.1)
487487
status_resp = client.backup.get_create_status(backup_id=backup_id, backend=BACKEND)
488-
assert status_resp.status == BackupStatus.CANCELED
488+
# there can be a race between the cancel and the backup completion
489+
assert status_resp.status == BackupStatus.CANCELED or status_resp.status == BackupStatus.SUCCESS

0 commit comments

Comments
 (0)