From c5cd5295b05d4cbae5cbc3d67308b188dbf0ecf9 Mon Sep 17 00:00:00 2001 From: jamesread Date: Mon, 29 Jun 2026 00:39:49 +0100 Subject: [PATCH] chore: fix race condition in tests --- service/internal/api/api_log_arguments_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/service/internal/api/api_log_arguments_test.go b/service/internal/api/api_log_arguments_test.go index a1924cf..1b85f64 100644 --- a/service/internal/api/api_log_arguments_test.go +++ b/service/internal/api/api_log_arguments_test.go @@ -64,6 +64,8 @@ func TestExecutionStatusIncludesStoredArguments(t *testing.T) { })) require.NoError(t, err) + waitForLogArguments(t, ex, startResp.Msg.ExecutionTrackingId) + statusResp, err := client.ExecutionStatus(context.Background(), connect.NewRequest(&apiv1.ExecutionStatusRequest{ ExecutionTrackingId: startResp.Msg.ExecutionTrackingId, })) @@ -105,6 +107,8 @@ func TestExecutionStatusOmitsPasswordArguments(t *testing.T) { })) require.NoError(t, err) + waitForLogArguments(t, ex, startResp.Msg.ExecutionTrackingId) + statusResp, err := client.ExecutionStatus(context.Background(), connect.NewRequest(&apiv1.ExecutionStatusRequest{ ExecutionTrackingId: startResp.Msg.ExecutionTrackingId, })) @@ -356,6 +360,8 @@ func TestGetLogsIncludesStoredArguments(t *testing.T) { require.NoError(t, err) require.NotEmpty(t, startResp.Msg.ExecutionTrackingId) + waitForLogArguments(t, ex, startResp.Msg.ExecutionTrackingId) + logsResp, err := client.GetLogs(context.Background(), connect.NewRequest(&apiv1.GetLogsRequest{})) require.NoError(t, err) require.NotEmpty(t, logsResp.Msg.Logs)