rpc: added configuration for yamux session (#25466)

Fixes: https://github.com/hashicorp/nomad/issues/25380
This commit is contained in:
Nikita Eliseev
2025-04-02 17:58:23 +03:00
committed by GitHub
parent 1a1ccec8b2
commit 76fb3eb9a1
21 changed files with 318 additions and 10 deletions

View File

@@ -19,6 +19,7 @@ import (
"github.com/hashicorp/nomad/helper/pluginutils/singleton"
"github.com/hashicorp/nomad/helper/pool"
"github.com/hashicorp/nomad/helper/testlog"
"github.com/hashicorp/yamux"
testing "github.com/mitchellh/go-testing-interface"
"github.com/shoenig/test/must"
)
@@ -118,7 +119,7 @@ func TestRPCOnlyClient(t testing.T, cb func(c *config.Config), srvAddr net.Addr,
}
client.heartbeatStop = newHeartbeatStop(
client.getAllocRunner, time.Second, client.logger, client.shutdownCh)
client.connPool = pool.NewPool(testlog.HCLogger(t), 10*time.Second, 10, nil)
client.connPool = pool.NewPool(testlog.HCLogger(t), 10*time.Second, 10, nil, yamux.DefaultConfig())
client.init()
cancelFunc := func() {