(t *testing.T, s *server.Server)
| 136 | } |
| 137 | |
| 138 | func shutdownJSServerAndRemoveStorage(t *testing.T, s *server.Server) { |
| 139 | t.Helper() |
| 140 | var sd string |
| 141 | if config := s.JetStreamConfig(); config != nil { |
| 142 | sd = config.StoreDir |
| 143 | } |
| 144 | s.Shutdown() |
| 145 | if sd != "" { |
| 146 | if err := os.RemoveAll(sd); err != nil { |
| 147 | t.Fatalf("Unable to remove storage %q: %v", sd, err) |
| 148 | } |
| 149 | } |
| 150 | s.WaitForShutdown() |
| 151 | } |
| 152 | |
| 153 | func setupJSClusterWithSize(t *testing.T, clusterName string, size int) []*jsServer { |
| 154 | t.Helper() |
no test coverage detected