mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 20:17:41 +00:00
DRA: fix failing test
Added error assertion for NodePrepareResources call unveiled "rpc error: code = DeadlineExceeded desc = context deadline exceeded" failure in the TestGRPCConnIsReused test. Setting clientCallTimeout field when creating plugin should fix it.
This commit is contained in:
parent
b8dcc2c983
commit
9d893c83f0
@ -109,8 +109,9 @@ func TestGRPCConnIsReused(t *testing.T) {
|
||||
m := sync.Mutex{}
|
||||
|
||||
p := &Plugin{
|
||||
backgroundCtx: ctx,
|
||||
endpoint: addr,
|
||||
backgroundCtx: ctx,
|
||||
endpoint: addr,
|
||||
clientCallTimeout: defaultClientCallTimeout,
|
||||
}
|
||||
|
||||
conn, err := p.getOrCreateGRPCConn()
|
||||
@ -148,7 +149,8 @@ func TestGRPCConnIsReused(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
client.NodePrepareResources(context.TODO(), req)
|
||||
_, err = client.NodePrepareResources(context.TODO(), req)
|
||||
assert.NoError(t, err)
|
||||
|
||||
client.mutex.Lock()
|
||||
conn := client.conn
|
||||
|
Loading…
Reference in New Issue
Block a user