[
https://issues.apache.org/jira/browse/BEAM-13399?focusedWorklogId=700295&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-700295
]
ASF GitHub Bot logged work on BEAM-13399:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 22/Dec/21 22:06
Start Date: 22/Dec/21 22:06
Worklog Time Spent: 10m
Work Description: lostluck commented on a change in pull request #16331:
URL: https://github.com/apache/beam/pull/16331#discussion_r774203240
##########
File path: sdks/go/test/integration/xlang/expansion_test.go
##########
@@ -33,16 +34,21 @@ const (
expansionPort = "8097"
)
-func checkPort(t *testing.T, port string) {
- ping := exec.Command("nc", "-vz", "localhost", port)
- output, err := ping.CombinedOutput()
- if err != nil {
- t.Errorf("failed to run ping to localhost:%v", port)
- }
- outputStr := string(output)
- if strings.Contains(outputStr, "failed") {
- t.Errorf("failed to connect to localhost:%v, got err %v", port,
outputStr)
+func checkPort(t *testing.T, port string, durationSeconds float64) {
Review comment:
Nit: use a time.Duration instead, then everything can work in the same
units.
eg pass in a 15 * time.Second
&then precalculate interval and use it in the loop...
https://go.dev/play/p/hkmgtbCX191
--
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: 700295)
Time Spent: 12h 10m (was: 12h)
> [Go SDK] Add automated expansion service start up feature
> ---------------------------------------------------------
>
> Key: BEAM-13399
> URL: https://issues.apache.org/jira/browse/BEAM-13399
> Project: Beam
> Issue Type: Improvement
> Components: cross-language, sdk-go
> Reporter: Jack McCluskey
> Assignee: Jack McCluskey
> Priority: P2
> Time Spent: 12h 10m
> Remaining Estimate: 0h
>
> Add Go SDK support for automated expansion service start-up if one is not
> provided, following the example of the Python implementation.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)