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:
Ed Bartosh 2024-08-01 23:56:38 +03:00
parent b8dcc2c983
commit 9d893c83f0

View File

@ -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