[
https://issues.apache.org/jira/browse/BEAM-14346?focusedWorklogId=760244&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-760244
]
ASF GitHub Bot logged work on BEAM-14346:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 21/Apr/22 17:29
Start Date: 21/Apr/22 17:29
Worklog Time Spent: 10m
Work Description: jrmccluskey commented on code in PR #17425:
URL: https://github.com/apache/beam/pull/17425#discussion_r855423932
##########
sdks/go/pkg/beam/core/runtime/exec/fn_test.go:
##########
@@ -181,20 +208,28 @@ func TestInvoke(t *testing.T) {
}
val, err := Invoke(context.Background(),
typex.NoFiringPane(), window.SingleGlobalWindow, ts, fn, test.Opt, nil,
test.Args...)
- if err != nil {
- t.Fatalf("Invoke(%v,%v) failed: %v",
fn.Fn.Name(), test.Args, err)
- }
- if val != nil && val.Elm != test.Expected {
- t.Errorf("Invoke(%v,%v) = %v, want %v",
fn.Fn.Name(), test.Args, val.Elm, test.Expected)
- }
- if val != nil && val.Elm2 != test.Expected2 {
- t.Errorf("Elm2: Invoke(%v,%v) = %v, want %v",
fn.Fn.Name(), test.Args, val.Elm2, test.Expected2)
- }
- if val != nil && val.Timestamp != test.ExpectedTime {
- t.Errorf("EventTime: Invoke(%v,%v) = %v, want
%v", fn.Fn.Name(), test.Args, val.Timestamp, test.ExpectedTime)
- }
- if val != nil && val.Continuation !=
test.ExpectedContinuation {
- t.Errorf("EventTime: Invoke(%v,%v) = %v, want
%v", fn.Fn.Name(), test.Args, val.Continuation, test.ExpectedContinuation)
+
+ switch test.ExpectedError != nil {
+ case true:
Review Comment:
Fixed.
Issue Time Tracking
-------------------
Worklog Id: (was: 760244)
Time Spent: 1h 10m (was: 1h)
> ret2() function checks incorrect index for error case
> -----------------------------------------------------
>
> Key: BEAM-14346
> URL: https://issues.apache.org/jira/browse/BEAM-14346
> Project: Beam
> Issue Type: Improvement
> Components: sdk-go
> Reporter: Jack McCluskey
> Assignee: Jack McCluskey
> Priority: P1
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> The updated ret2() function is checking a non-existent index (2) for errors
> when it should be checking index 1.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)