From d040cdfb383877baff941ad705cf2da33f5d7c8f Mon Sep 17 00:00:00 2001 From: Matt McShane Date: Thu, 11 May 2023 14:30:13 -0400 Subject: [PATCH] Improve Update.WaitAccepted - followup (#4312) Github is having problems this morning and appears to have dropped this final update to the previous PR. --- service/history/workflow/update/update_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/service/history/workflow/update/update_test.go b/service/history/workflow/update/update_test.go index 6dcaad505d9..1d081ea44d7 100644 --- a/service/history/workflow/update/update_test.go +++ b/service/history/workflow/update/update_test.go @@ -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()) }