MCPcopy
hub / github.com/NVIDIA/aistore / waitForStartup

Function waitForStartup

devtools/tutils/client.go:665–683  ·  view source on GitHub ↗
(baseParams api.BaseParams, ts ...testing.TB)

Source from the content-addressed store, hash-verified

663}
664
665func waitForStartup(baseParams api.BaseParams, ts ...testing.TB) (*cluster.Smap, error) {
666 for {
667 smap, err := api.GetClusterMap(baseParams)
668 if err != nil {
669 if api.HTTPStatus(err) == http.StatusServiceUnavailable {
670 tlog.Logln("waiting for the cluster to start up...")
671 time.Sleep(waitClusterStartup)
672 continue
673 }
674
675 tlog.Logf("unable to get usable cluster map, err: %v\n", err)
676 if len(ts) > 0 {
677 tassert.CheckFatal(ts[0], err)
678 }
679 return nil, err
680 }
681 return smap, nil
682 }
683}

Callers 4

RandomProxyURLFunction · 0.85
initPmapFunction · 0.85
initNodeCmdFunction · 0.85
GetClusterMapFunction · 0.85

Calls 5

GetClusterMapFunction · 0.92
HTTPStatusFunction · 0.92
LoglnFunction · 0.92
LogfFunction · 0.92
CheckFatalFunction · 0.92

Tested by

no test coverage detected