Проверить ЛР4: сборка MinIO из исходников и результаты полного прогона
This commit is contained in:
@@ -38,6 +38,12 @@ try:
|
||||
with psycopg.connect(dsn) as db:
|
||||
db.execute("UPDATE attachments SET status='ready' WHERE id=%s", (ids[0],))
|
||||
db.rollback()
|
||||
# Even an old intent must survive while a live finalization holds its lock.
|
||||
with psycopg.connect(dsn) as active:
|
||||
active.execute('SELECT id FROM attachments WHERE id=%s FOR UPDATE', (ids[0],))
|
||||
sweep()
|
||||
storage.client.head_object(Bucket=storage.BUCKET, Key=keys[0])
|
||||
assert active.execute('SELECT status FROM attachments WHERE id=%s', (ids[0],)).fetchone()[0] == 'pending'
|
||||
sweep()
|
||||
sweep() # Idempotent after completion.
|
||||
with psycopg.connect(dsn) as db:
|
||||
@@ -50,7 +56,7 @@ try:
|
||||
assert error.response['ResponseMetadata']['HTTPStatusCode']==404
|
||||
for key in keys[1:]:
|
||||
storage.client.head_object(Bucket=storage.BUCKET,Key=key)
|
||||
print('PASS: private bucket, failed finalization recovery, grace period, ready protection, repeated cleanup')
|
||||
print('PASS: private bucket, failed finalization recovery, active lock protection, grace period, ready protection, repeated cleanup')
|
||||
finally:
|
||||
for key in keys:
|
||||
storage.client.delete_object(Bucket=storage.BUCKET,Key=key)
|
||||
|
||||
Reference in New Issue
Block a user