Skip to content

Commit

Permalink
Improve Update.WaitAccepted - followup (#4312)
Browse files Browse the repository at this point in the history
Github is having problems this morning and appears to have dropped this
final update to the previous PR.
  • Loading branch information
Matt McShane authored May 11, 2023
1 parent 3bfac8a commit d040cdf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions service/history/workflow/update/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,8 @@ func TestRejectionWithAcceptanceWaiter(t *testing.T) {
require.NoError(t, upd.OnMessage(ctx, &req, store))
require.NoError(t, upd.OnMessage(ctx, &rej, store))

outcome, ok := (<-ch).(*updatepb.Outcome)
require.True(t, ok)
retVal := <-ch
outcome, ok := retVal.(*updatepb.Outcome)
require.Truef(t, ok, "WaitAccepted returned an unexpected type: %T", retVal)
require.Equal(t, rej.Failure, outcome.GetFailure())
}

0 comments on commit d040cdf

Please sign in to comment.