From 42249308ef5f267abd20a8b4bbb25ddaaeab2688 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Fri, 29 Nov 2024 16:15:46 +0300 Subject: [PATCH] fix: rename const Signed-off-by: Vladislav Sukhin --- pkg/agent/testworkflows.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/agent/testworkflows.go b/pkg/agent/testworkflows.go index 5e02576384..94437742ec 100644 --- a/pkg/agent/testworkflows.go +++ b/pkg/agent/testworkflows.go @@ -23,8 +23,8 @@ import ( const testWorkflowNotificationsRetryCount = 10 var ( - retryDelay = 100 * time.Millisecond - waitTimeout = 24 * time.Hour + logRetryDelay = 100 * time.Millisecond + serviceWaitTimeout = 24 * time.Hour ) func getTestWorkflowNotificationType(n testkube.TestWorkflowExecutionNotification) cloud.TestWorkflowNotificationType { @@ -190,7 +190,7 @@ func (ag *Agent) executeWorkflowNotificationsRequest(ctx context.Context, req *c // Cloud sometimes slow to insert execution or test // while WorkflowNotifications request from websockets comes in faster // so we retry up to testWorkflowNotificationsRetryCount times. - time.Sleep(retryDelay) + time.Sleep(logRetryDelay) notificationsCh, err = ag.testWorkflowNotificationsFunc(ctx, req.ExecutionId) } } @@ -243,7 +243,7 @@ func (ag *Agent) executeWorkflowNotificationsRequest(ctx context.Context, req *c } func (ag *Agent) executeWorkflowServiceNotificationsRequest(ctx context.Context, req *cloud.TestWorkflowServiceNotificationsRequest) error { - timeoutCtx, cancel := context.WithTimeout(ctx, waitTimeout) + timeoutCtx, cancel := context.WithTimeout(ctx, serviceWaitTimeout) defer cancel() notificationsCh, err := retry.DoWithData( @@ -255,7 +255,7 @@ func (ag *Agent) executeWorkflowServiceNotificationsRequest(ctx context.Context, return ag.testWorkflowServiceNotificationsFunc(ctx, req.ExecutionId, req.ServiceName, int(req.ServiceIndex)) }, retry.DelayType(retry.FixedDelay), - retry.Delay(retryDelay), + retry.Delay(logRetryDelay), retry.Context(timeoutCtx), retry.RetryIf(func(err error) bool { return errors.Is(err, registry.ErrResourceNotFound)