[ 
https://issues.apache.org/jira/browse/BEAM-13909?focusedWorklogId=736804&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-736804
 ]

ASF GitHub Bot logged work on BEAM-13909:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/Mar/22 17:25
            Start Date: 04/Mar/22 17:25
    Worklog Time Spent: 10m 
      Work Description: riteshghorse commented on a change in pull request 
#17014:
URL: https://github.com/apache/beam/pull/17014#discussion_r819768183



##########
File path: sdks/go/pkg/beam/provision/provision_test.go
##########
@@ -52,3 +58,37 @@ func TestConversions(t *testing.T) {
                }
        }
 }
+
+type ProvisionServiceServicer struct {
+       fnpb.UnimplementedProvisionServiceServer
+}
+
+func (p ProvisionServiceServicer) GetProvisionInfo(ctx context.Context, req 
*fnpb.GetProvisionInfoRequest) (*fnpb.GetProvisionInfoResponse, error) {
+       return &fnpb.GetProvisionInfoResponse{Info: 
&fnpb.ProvisionInfo{RetrievalToken: "token"}}, nil
+}
+
+func setup(addr string, prs *ProvisionServiceServicer) {
+       l, err := net.Listen("tcp", addr)
+       if err != nil {
+               log.Fatalf("failed to listen on addr: %v", err)
+       }
+       server := grpc.NewServer()
+       defer server.Stop()
+       fnpb.RegisterProvisionServiceServer(server, prs)
+       if err := server.Serve(l); err != nil {
+               log.Fatalf("cannot serve the server: %v", err)
+       }
+}
+
+func TestProvisionInfo(t *testing.T) {
+       prs := &ProvisionServiceServicer{}
+       go setup(":9000", prs)

Review comment:
       Done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 736804)
    Time Spent: 1h 20m  (was: 1h 10m)

> Increase unit testing in the provision package
> ----------------------------------------------
>
>                 Key: BEAM-13909
>                 URL: https://issues.apache.org/jira/browse/BEAM-13909
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-go
>            Reporter: Jack McCluskey
>            Assignee: Ritesh Ghorse
>            Priority: P2
>              Labels: starter
>             Fix For: 2.38.0
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Increase unit testing coverage in the [provision 
> package|https://github.com/apache/beam/tree/release-2.36.0/sdks/go/pkg/beam/provision]
> We want code coverage at or above 50%, it is currently at 42.3%.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to