MCPcopy
hub / github.com/osrg/gobgp / Wait

Method Wait

pkg/server/server_test.go:516–525  ·  view source on GitHub ↗
(t *testing.T, timeout time.Duration)

Source from the content-addressed store, hash-verified

514}
515
516func (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
527func waitPeerState(t *testing.T, s *BgpServer, state api.PeerState_SessionState, timeout time.Duration, expectedFamilies ...bgp.Family) {
528 t.Helper()

Calls

no outgoing calls

Tested by

no test coverage detected