MCPcopy
hub / github.com/nats-io/nats.go / withJSCluster

Function withJSCluster

test/js_test.go:6509–6522  ·  view source on GitHub ↗
(t *testing.T, clusterName string, size int, tfn func(t *testing.T, srvs ...*jsServer))

Source from the content-addressed store, hash-verified

6507}
6508
6509func withJSCluster(t *testing.T, clusterName string, size int, tfn func(t *testing.T, srvs ...*jsServer)) {
6510 t.Helper()
6511
6512 nodes := setupJSClusterWithSize(t, clusterName, size)
6513 defer func() {
6514 // Ensure that they get shutdown and remove their state.
6515 for _, node := range nodes {
6516 node.restart.Lock()
6517 shutdownJSServerAndRemoveStorage(t, node.Server)
6518 node.restart.Unlock()
6519 }
6520 }()
6521 tfn(t, nodes...)
6522}
6523
6524func withJSClusterAndStream(t *testing.T, clusterName string, size int, stream *nats.StreamConfig, tfn func(t *testing.T, subject string, srvs ...*jsServer)) {
6525 t.Helper()

Calls 2

setupJSClusterWithSizeFunction · 0.70

Tested by

no test coverage detected