(t *testing.T)
| 37 | } |
| 38 | |
| 39 | func 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 | |
| 48 | func TestDefaultReconnectJitter(t *testing.T) { |
| 49 | opts := nats.GetDefaultOptions() |