From 3a12f9aacfe65f64ffb405e544144223745be44f Mon Sep 17 00:00:00 2001 From: Matt McShane Date: Wed, 10 May 2023 21:19:50 -0400 Subject: [PATCH] Improve Update.WaitAccepted - followup 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()) }