From 8488df48e83fcd2fb57768733c5b2a7082cdd249 Mon Sep 17 00:00:00 2001 From: Paolo Chila Date: Mon, 17 Jun 2024 15:26:05 +0200 Subject: [PATCH] Replicate sdh issue by slowing agent startup down --- internal/pkg/agent/cmd/run.go | 1 + testing/integration/proxy_url_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/pkg/agent/cmd/run.go b/internal/pkg/agent/cmd/run.go index f5c1db4d498..87ec2d17671 100644 --- a/internal/pkg/agent/cmd/run.go +++ b/internal/pkg/agent/cmd/run.go @@ -153,6 +153,7 @@ func logReturn(l *logger.Logger, err error) error { } func runElasticAgent(ctx context.Context, cancel context.CancelFunc, override cfgOverrider, stop chan bool, testingMode bool, fleetInitTimeout time.Duration, runAsOtel bool, awaiters awaiters, modifiers ...component.PlatformModifier) error { + time.Sleep(time.Minute) cfg, err := loadConfig(ctx, override, runAsOtel) if err != nil { return err diff --git a/testing/integration/proxy_url_test.go b/testing/integration/proxy_url_test.go index 51c3895b66d..74bd40c7a69 100644 --- a/testing/integration/proxy_url_test.go +++ b/testing/integration/proxy_url_test.go @@ -698,7 +698,7 @@ func TestProxyURL(t *testing.T) { } // Specific testcase setup and map of created proxies - proxies, args := tt.setup(t, mockFleet) + _, args := tt.setup(t, mockFleet) fixture, err := define.NewFixtureFromLocalBuild(t, define.Version(), @@ -732,9 +732,9 @@ func TestProxyURL(t *testing.T) { Key: args.key, }}) t.Logf("elastic-agent install output: \n%s\n", string(out)) - if tt.wantErr(t, err, "elastic-agent install returned an unexpected error") { - tt.assertFunc(ctx, t, fixture, proxies, mockFleet) - } + //if tt.wantErr(t, err, "elastic-agent install returned an unexpected error") { + // tt.assertFunc(ctx, t, fixture, proxies, mockFleet) + //} }) }