MCPcopy
hub / github.com/istio/istio / waitUntilReady

Method waitUntilReady

pkg/test/echo/server/instance.go:267–290  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

265}
266
267func (s *Instance) waitUntilReady() error {
268 wg := &sync.WaitGroup{}
269
270 onEndpointReady := func() {
271 wg.Done()
272 }
273
274 // Start the servers, updating port numbers as necessary.
275 for _, ep := range s.endpoints {
276 wg.Add(1)
277 if err := ep.Start(onEndpointReady); err != nil {
278 return err
279 }
280 }
281
282 // Wait for all the servers to start.
283 wg.Wait()
284
285 // Indicate that the server is now ready.
286 atomic.StoreUint32(&s.ready, 1)
287
288 log.Info("Echo server is now ready")
289 return nil
290}
291
292func (s *Instance) validate() error {
293 for _, port := range s.Ports {

Callers 1

StartMethod · 0.95

Calls 5

DoneMethod · 0.95
AddMethod · 0.95
InfoFunction · 0.92
StartMethod · 0.65
WaitMethod · 0.65

Tested by

no test coverage detected