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

Function withJSCluster

jetstream/test/helper_test.go:292–305  ·  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

290}
291
292func withJSCluster(t *testing.T, clusterName string, size int, tfn func(t *testing.T, srvs ...*jsServer)) {
293 t.Helper()
294
295 nodes := setupJSClusterWithSize(t, clusterName, size)
296 defer func() {
297 // Ensure that they get shutdown and remove their state.
298 for _, node := range nodes {
299 node.restart.Lock()
300 shutdownJSServerAndRemoveStorage(t, node.Server)
301 node.restart.Unlock()
302 }
303 }()
304 tfn(t, nodes...)
305}
306
307func restartBasicJSServer(t *testing.T, s *server.Server) *server.Server {
308 opts := natsserver.DefaultTestOptions

Callers 1

withJSClusterAndStreamFunction · 0.70

Calls 2

setupJSClusterWithSizeFunction · 0.70

Tested by

no test coverage detected