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

Function TestReconnectTotalTime

test/reconnect_test.go:39–46  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

37}
38
39func TestReconnectTotalTime(t *testing.T) {
40 opts := nats.GetDefaultOptions()
41 totalReconnectTime := time.Duration(opts.MaxReconnect) * opts.ReconnectWait
42 if totalReconnectTime < (2 * time.Minute) {
43 t.Fatalf("Total reconnect time should be at least 2 mins: Currently %v\n",
44 totalReconnectTime)
45 }
46}
47
48func TestDefaultReconnectJitter(t *testing.T) {
49 opts := nats.GetDefaultOptions()

Callers

nothing calls this directly

Calls 2

DurationMethod · 0.80
FatalfMethod · 0.80

Tested by

no test coverage detected