From cf20649a204109d5f9d5d9349033041948d8235c Mon Sep 17 00:00:00 2001 From: Robert Burke Date: Fri, 21 Jul 2023 07:34:49 -0700 Subject: [PATCH] [prism] registrations for Regression tests. (#27589) Co-authored-by: lostluck <13907733+lostluck@users.noreply.github.com> --- sdks/go/test/regression/lperror.go | 7 +++++++ sdks/go/test/regression/pardo.go | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/sdks/go/test/regression/lperror.go b/sdks/go/test/regression/lperror.go index 088f81d7a7cb..db327e588a58 100644 --- a/sdks/go/test/regression/lperror.go +++ b/sdks/go/test/regression/lperror.go @@ -22,8 +22,15 @@ import ( "sort" "github.com/apache/beam/sdks/v2/go/pkg/beam" + "github.com/apache/beam/sdks/v2/go/pkg/beam/register" ) +func init() { + register.Function2x2(toFoo) + register.Iter1[*fruit]() + register.Function3x1(toID) +} + // REPRO found by https://github.com/zelliott type fruit struct { diff --git a/sdks/go/test/regression/pardo.go b/sdks/go/test/regression/pardo.go index 4b8fba7f9dd6..7dc28bff2db0 100644 --- a/sdks/go/test/regression/pardo.go +++ b/sdks/go/test/regression/pardo.go @@ -18,10 +18,22 @@ package regression import ( "github.com/apache/beam/sdks/v2/go/pkg/beam" + "github.com/apache/beam/sdks/v2/go/pkg/beam/register" "github.com/apache/beam/sdks/v2/go/pkg/beam/testing/passert" "github.com/apache/beam/sdks/v2/go/pkg/beam/testing/ptest" ) +func init() { + register.Function1x1(directFn) + register.Function2x0(emitFn) + register.Function3x0(emit2Fn) + register.Function2x1(mixedFn) + register.Function2x2(directCountFn) + register.Function3x1(emitCountFn) + register.Emitter1[int]() + register.Iter1[int]() +} + func directFn(elm int) int { return elm + 1 }