extended deadline for grpc calls

main
Ben Grewell 3 years ago
parent 3c08964b38
commit d1dbcb7be3

@ -57,45 +57,45 @@
<module name="go-iperf" /> <module name="go-iperf" />
<working_directory value="$PROJECT_DIR$" /> <working_directory value="$PROJECT_DIR$" />
<kind value="PACKAGE" /> <kind value="PACKAGE" />
<filePath value="$PROJECT_DIR$/cmd/main.go" />
<package value="github.com/BGrewell/go-iperf/cmd" /> <package value="github.com/BGrewell/go-iperf/cmd" />
<directory value="$PROJECT_DIR$" /> <directory value="$PROJECT_DIR$" />
<filePath value="$PROJECT_DIR$/cmd/main.go" />
<method v="2" /> <method v="2" />
</configuration> </configuration>
<configuration name="go build github.com/BGrewell/go-iperf/tests/client" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true"> <configuration name="go build github.com/BGrewell/go-iperf/tests/client" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true">
<module name="go-iperf" /> <module name="go-iperf" />
<working_directory value="$PROJECT_DIR$" /> <working_directory value="$PROJECT_DIR$" />
<kind value="PACKAGE" /> <kind value="PACKAGE" />
<filePath value="$PROJECT_DIR$/tests/client/client.go" />
<package value="github.com/BGrewell/go-iperf/tests/client" /> <package value="github.com/BGrewell/go-iperf/tests/client" />
<directory value="$PROJECT_DIR$" /> <directory value="$PROJECT_DIR$" />
<filePath value="$PROJECT_DIR$/tests/client/client.go" />
<method v="2" /> <method v="2" />
</configuration> </configuration>
<configuration name="go build github.com/BGrewell/go-iperf/tests/controller" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true"> <configuration name="go build github.com/BGrewell/go-iperf/tests/controller" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true">
<module name="go-iperf" /> <module name="go-iperf" />
<working_directory value="$PROJECT_DIR$" /> <working_directory value="$PROJECT_DIR$" />
<kind value="PACKAGE" /> <kind value="PACKAGE" />
<filePath value="$PROJECT_DIR$/tests/controller/main.go" />
<package value="github.com/BGrewell/go-iperf/tests/controller" /> <package value="github.com/BGrewell/go-iperf/tests/controller" />
<directory value="$PROJECT_DIR$" /> <directory value="$PROJECT_DIR$" />
<filePath value="$PROJECT_DIR$/tests/controller/main.go" />
<method v="2" /> <method v="2" />
</configuration> </configuration>
<configuration name="go build github.com/BGrewell/go-iperf/tests/extract" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true"> <configuration name="go build github.com/BGrewell/go-iperf/tests/extract" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true">
<module name="go-iperf" /> <module name="go-iperf" />
<working_directory value="$PROJECT_DIR$" /> <working_directory value="$PROJECT_DIR$" />
<kind value="PACKAGE" /> <kind value="PACKAGE" />
<filePath value="$PROJECT_DIR$/tests/extract/main.go" />
<package value="github.com/BGrewell/go-iperf/tests/extract" /> <package value="github.com/BGrewell/go-iperf/tests/extract" />
<directory value="$PROJECT_DIR$" /> <directory value="$PROJECT_DIR$" />
<filePath value="$PROJECT_DIR$/tests/extract/main.go" />
<method v="2" /> <method v="2" />
</configuration> </configuration>
<configuration name="go build github.com/BGrewell/go-iperf/tests/server" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true"> <configuration name="go build github.com/BGrewell/go-iperf/tests/server" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true">
<module name="go-iperf" /> <module name="go-iperf" />
<working_directory value="$PROJECT_DIR$" /> <working_directory value="$PROJECT_DIR$" />
<kind value="PACKAGE" /> <kind value="PACKAGE" />
<filePath value="$PROJECT_DIR$/tests/server/server.go" />
<package value="github.com/BGrewell/go-iperf/tests/server" /> <package value="github.com/BGrewell/go-iperf/tests/server" />
<directory value="$PROJECT_DIR$" /> <directory value="$PROJECT_DIR$" />
<filePath value="$PROJECT_DIR$/tests/server/server.go" />
<method v="2" /> <method v="2" />
</configuration> </configuration>
<recent_temporary> <recent_temporary>

@ -117,7 +117,7 @@ func (c *Controller) NewClient(serverAddr string) (client *Client, err error) {
return nil, err return nil, err
} }
ctx, cancel := context.WithTimeout(context.Background(), time.Second) ctx, cancel := context.WithTimeout(context.Background(), 2 * time.Second)
defer cancel() defer cancel()
reply, err := grpc.GrpcRequestServer(ctx, &api.StartServerRequest{}) reply, err := grpc.GrpcRequestServer(ctx, &api.StartServerRequest{})
srvPort := int(reply.ListenPort) srvPort := int(reply.ListenPort)

Loading…
Cancel
Save