(t *testing.T, clusterName string, size int, tfn func(t *testing.T, srvs ...*jsServer))
| 6507 | } |
| 6508 | |
| 6509 | func 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 | |
| 6524 | func withJSClusterAndStream(t *testing.T, clusterName string, size int, stream *nats.StreamConfig, tfn func(t *testing.T, subject string, srvs ...*jsServer)) { |
| 6525 | t.Helper() |
no test coverage detected