lock: Timeout Unlock RPC call (#12213)
RPC unlock call needs to be timed out otherwise this can block indefinitely. Signed-off-by: Anis Elleuch <anis@min.io>
This commit is contained in:
@@ -47,12 +47,12 @@ func TestLockRESTlient(t *testing.T) {
|
||||
t.Fatal("Expected for Lock to fail")
|
||||
}
|
||||
|
||||
_, err = lkClient.RUnlock(dsync.LockArgs{})
|
||||
_, err = lkClient.RUnlock(context.Background(), dsync.LockArgs{})
|
||||
if err == nil {
|
||||
t.Fatal("Expected for RUnlock to fail")
|
||||
}
|
||||
|
||||
_, err = lkClient.Unlock(dsync.LockArgs{})
|
||||
_, err = lkClient.Unlock(context.Background(), dsync.LockArgs{})
|
||||
if err == nil {
|
||||
t.Fatal("Expected for Unlock to fail")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user