mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
check for context canceled after competing for locks (#13239)
once we have competed for locks, verify if the context is still valid - this is to ensure that we do not start readdir() or read() calls on the drives on canceled connections.
This commit is contained in:
@@ -1834,7 +1834,7 @@ func TestXLStorageReadMetadata(t *testing.T) {
|
||||
}
|
||||
|
||||
disk.MakeVol(context.Background(), volume)
|
||||
if _, err := disk.readMetadata(pathJoin(tmpDir, volume, object)); err != errFileNameTooLong {
|
||||
if _, err := disk.readMetadata(context.Background(), pathJoin(tmpDir, volume, object)); err != errFileNameTooLong {
|
||||
t.Fatalf("Unexpected error from readMetadata - expect %v: got %v", errFileNameTooLong, err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user