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

Function shutdownJSServerAndRemoveStorage

jetstream/test/helper_test.go:138–151  ·  view source on GitHub ↗
(t *testing.T, s *server.Server)

Source from the content-addressed store, hash-verified

136}
137
138func 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
153func setupJSClusterWithSize(t *testing.T, clusterName string, size int) []*jsServer {
154 t.Helper()

Callers 15

TestConsumerInfoFunction · 0.70
TestConsumerOverflowFunction · 0.70
TestConsumerPinnedFunction · 0.70
TestConsumerUnpinFunction · 0.70
TestConsumerPrioritizedFunction · 0.70
TestConsumerCachedInfoFunction · 0.70
TestMessageDetailsFunction · 0.70
TestAckVariantsFunction · 0.70
TestPushConsumerConsumeFunction · 0.70

Calls 1

FatalfMethod · 0.80

Tested by

no test coverage detected