mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Automatic style fix
This commit is contained in:
parent
1994bc0d05
commit
201b4fd661
@ -116,18 +116,14 @@ def wait_for_fail_backup(node, backup_id, backup_name):
|
||||
"Concurrent backups not supported",
|
||||
f"Backup {backup_name} already exists",
|
||||
]
|
||||
status = (
|
||||
node
|
||||
.query(f"SELECT status FROM system.backups WHERE id == '{backup_id}'")
|
||||
.rstrip("\n")
|
||||
)
|
||||
status = node.query(
|
||||
f"SELECT status FROM system.backups WHERE id == '{backup_id}'"
|
||||
).rstrip("\n")
|
||||
# It is possible that the second backup was picked up first, and then the async backup
|
||||
if status == "BACKUP_FAILED":
|
||||
error = (
|
||||
node
|
||||
.query(f"SELECT error FROM system.backups WHERE id == '{backup_id}'")
|
||||
.rstrip("\n")
|
||||
)
|
||||
error = node.query(
|
||||
f"SELECT error FROM system.backups WHERE id == '{backup_id}'"
|
||||
).rstrip("\n")
|
||||
assert any([expected_error in error for expected_error in expected_errors])
|
||||
return
|
||||
elif status == "CREATING_BACKUP":
|
||||
@ -138,11 +134,9 @@ def wait_for_fail_backup(node, backup_id, backup_name):
|
||||
sleep_time=2,
|
||||
retry_count=50,
|
||||
)
|
||||
error = (
|
||||
node
|
||||
.query(f"SELECT error FROM system.backups WHERE id == '{backup_id}'")
|
||||
.rstrip("\n")
|
||||
)
|
||||
error = node.query(
|
||||
f"SELECT error FROM system.backups WHERE id == '{backup_id}'"
|
||||
).rstrip("\n")
|
||||
assert re.search(f"Backup {backup_name} already exists", error)
|
||||
return
|
||||
else:
|
||||
@ -154,18 +148,14 @@ def wait_for_fail_restore(node, restore_id):
|
||||
"Concurrent restores not supported",
|
||||
"Cannot restore the table default.tbl because it already contains some data",
|
||||
]
|
||||
status = (
|
||||
node
|
||||
.query(f"SELECT status FROM system.backups WHERE id == '{restore_id}'")
|
||||
.rstrip("\n")
|
||||
)
|
||||
status = node.query(
|
||||
f"SELECT status FROM system.backups WHERE id == '{restore_id}'"
|
||||
).rstrip("\n")
|
||||
# It is possible that the second backup was picked up first, and then the async backup
|
||||
if status == "RESTORE_FAILED":
|
||||
error = (
|
||||
node
|
||||
.query(f"SELECT error FROM system.backups WHERE id == '{restore_id}'")
|
||||
.rstrip("\n")
|
||||
)
|
||||
error = node.query(
|
||||
f"SELECT error FROM system.backups WHERE id == '{restore_id}'"
|
||||
).rstrip("\n")
|
||||
assert any([expected_error in error for expected_error in expected_errors])
|
||||
return
|
||||
elif status == "RESTORING":
|
||||
@ -176,12 +166,13 @@ def wait_for_fail_restore(node, restore_id):
|
||||
sleep_time=2,
|
||||
retry_count=50,
|
||||
)
|
||||
error = (
|
||||
node
|
||||
.query(f"SELECT error FROM system.backups WHERE id == '{backup_id}'")
|
||||
.rstrip("\n")
|
||||
error = node.query(
|
||||
f"SELECT error FROM system.backups WHERE id == '{backup_id}'"
|
||||
).rstrip("\n")
|
||||
assert re.search(
|
||||
"Cannot restore the table default.tbl because it already contains some data",
|
||||
error,
|
||||
)
|
||||
assert re.search("Cannot restore the table default.tbl because it already contains some data",error)
|
||||
return
|
||||
else:
|
||||
assert False, "Concurrent restores both passed, when one is expected to fail"
|
||||
|
Loading…
Reference in New Issue
Block a user