You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/12/21 21:24:17 UTC

[GitHub] [beam] lostluck commented on a change in pull request #16313: [BEAM-13399] Add integration test for Go SDK expansion service JAR pull/start-up

lostluck commented on a change in pull request #16313:
URL: https://github.com/apache/beam/pull/16313#discussion_r773452247



##########
File path: sdks/go/test/integration/xlang/expansion_test.go
##########
@@ -0,0 +1,51 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package xlang
+
+import (
+	"os"
+	"testing"
+
+	"github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/xlangx/expansionx"
+	"github.com/apache/beam/sdks/v2/go/test/integration"
+)
+
+const (
+	// TODO(BEAN-13505): Select the most recent Beam release instead of a hard-coded
+	// string.
+	beamVersion  = "2.34.0"
+	gradleTarget = ":sdks:java:io:expansion-service:runExpansionService"
+)
+
+func TestAutomatedExpansionService(t *testing.T) {
+	integration.CheckFilters(t)
+	jarPath, err := expansionx.GetBeamJar(gradleTarget, beamVersion)
+	if err != nil {
+		t.Fatalf("failed to get JAR path, got %v", err)
+	}
+	t.Cleanup(func() { os.Remove(jarPath) })
+
+	serviceRunner := expansionx.NewExpansionServiceRunner(jarPath, "8097")
+	err = serviceRunner.StartService()
+	if err != nil {
+		t.Errorf("failed to start expansion service JAR, got %v", err)
+	}
+

Review comment:
       My only concern is whether we should send a ping or *something* to actually validate that the jar is running a service at the port. Right now, black-box, the service runner could be replaced with no-ops and pass.
   
   Otherwise it LGTM.




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org