Skip to content

Commit 1e08066

Browse files
fix: increase context timeout to accommodate for slower machines in Test_checkForUnprivilegedVault (#8374) (#8392)
* fix: increase context timeout to accommodate for slower machines in Test_checkForUnprivilegedVault * fix: SA1019 logp.NewInMemory is deprecated (cherry picked from commit 738cc40) Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
1 parent 7b66cbb commit 1e08066

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/pkg/agent/install/uninstall_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func Test_checkForUnprivilegedVault(t *testing.T) {
9292
for _, tt := range tests {
9393
t.Run(tt.name, func(t *testing.T) {
9494
tempDir := t.TempDir()
95-
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
95+
ctx, cancel := context.WithTimeout(t.Context(), 20*time.Second)
9696
defer cancel()
9797
testVaultPath := filepath.Join(tempDir, filepath.Base(paths.AgentVaultPath()))
9898

@@ -174,7 +174,7 @@ func TestNotifyFleetAuditUnenroll(t *testing.T) {
174174
err: fmt.Errorf("unretryable return status: 409"),
175175
}}
176176

177-
log, _ := logp.NewInMemory("test", zap.NewDevelopmentEncoderConfig())
177+
log, _ := logp.NewInMemoryLocal("test", zap.NewDevelopmentEncoderConfig())
178178
pt := progressbar.NewOptions(-1, progressbar.OptionSetWriter(io.Discard))
179179
var agentID agentInfo = "testID"
180180

0 commit comments

Comments
 (0)