You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lo...@apache.org on 2020/07/22 22:01:17 UTC

[beam] 01/01: Relax ParDo# test

This is an automated email from the ASF dual-hosted git repository.

lostluck pushed a commit to branch lostluck-patch-1
in repository https://gitbox.apache.org/repos/asf/beam.git

commit f5b4179bcc3227aedd7ca7eddd6be87000c61831
Author: Robert Burke <lo...@users.noreply.github.com>
AuthorDate: Wed Jul 22 15:01:00 2020 -0700

    Relax ParDo# test
    
    The test ends up being brittle if the package is vendored, so removing most of the package path from the check validates the important parts, but allows the vendoring paths to succeed.
---
 sdks/go/pkg/beam/pardo_test.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sdks/go/pkg/beam/pardo_test.go b/sdks/go/pkg/beam/pardo_test.go
index 00b3ec3..eae0ced 100644
--- a/sdks/go/pkg/beam/pardo_test.go
+++ b/sdks/go/pkg/beam/pardo_test.go
@@ -16,6 +16,7 @@
 package beam
 
 import (
+	"strings"
 	"testing"
 )
 
@@ -55,8 +56,8 @@ func testFunction() int64 {
 
 func TestFormatParDoError(t *testing.T) {
 	got := formatParDoError(testFunction, 2, 1)
-	want := "DoFn github.com/apache/beam/sdks/go/pkg/beam.testFunction has 2 outputs, but ParDo requires 1 outputs, use ParDo2 instead."
-	if got != want {
+	want := "beam.testFunction has 2 outputs, but ParDo requires 1 outputs, use ParDo2 instead."
+	if !strings.Contains(got, want) {
 		t.Errorf("formatParDoError(testFunction,2,1) = %v, want = %v", got, want)
 	}
 }