(t *testing.T, timeout time.Duration)
| 514 | } |
| 515 | |
| 516 | func (w *peerStateWaiter) Wait(t *testing.T, timeout time.Duration) { |
| 517 | t.Helper() |
| 518 | select { |
| 519 | case <-w.doneCh: |
| 520 | return |
| 521 | case <-time.After(timeout): |
| 522 | w.cancel() |
| 523 | t.Fatalf("failed to reach state %v within %s", w.state, timeout) |
| 524 | } |
| 525 | } |
| 526 | |
| 527 | func waitPeerState(t *testing.T, s *BgpServer, state api.PeerState_SessionState, timeout time.Duration, expectedFamilies ...bgp.Family) { |
| 528 | t.Helper() |
no outgoing calls
no test coverage detected