MCPcopy
hub / github.com/seaweedfs/seaweedfs / waitForServer

Function waitForServer

test/erasure_coding/ec_integration_test.go:497–507  ·  view source on GitHub ↗
(address string, timeout time.Duration)

Source from the content-addressed store, hash-verified

495}
496
497func waitForServer(address string, timeout time.Duration) error {
498 start := time.Now()
499 for time.Since(start) < timeout {
500 if conn, err := grpc.NewClient(address, grpc.WithInsecure()); err == nil {
501 conn.Close()
502 return nil
503 }
504 time.Sleep(500 * time.Millisecond)
505 }
506 return fmt.Errorf("timeout waiting for server %s", address)
507}
508
509func uploadTestData(data []byte, masterAddress string) (needle.VolumeId, error) {
510 // Upload data to get a file ID

Calls 2

NowMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected