소스 검색

block until rpc connection is ready

Darien Raymond 7 년 전
부모
커밋
1179ecef27
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      testing/scenarios/command_test.go

+ 2 - 2
testing/scenarios/command_test.go

@@ -116,7 +116,7 @@ func TestCommanderRemoveHandler(t *testing.T) {
 		assert(conn.Close(), IsNil)
 	}
 
-	cmdConn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", cmdPort), grpc.WithInsecure())
+	cmdConn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", cmdPort), grpc.WithInsecure(), grpc.WithBlock())
 	assert(err, IsNil)
 
 	hsClient := command.NewHandlerServiceClient(cmdConn)
@@ -296,7 +296,7 @@ func TestCommanderAddRemoveUser(t *testing.T) {
 		assert(conn.Close(), IsNil)
 	}
 
-	cmdConn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", cmdPort), grpc.WithInsecure())
+	cmdConn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", cmdPort), grpc.WithInsecure(), grpc.WithBlock())
 	assert(err, IsNil)
 
 	hsClient := command.NewHandlerServiceClient(cmdConn)