Skip to content

Commit 0f97203

Browse files
pkoutsovasilismichel-laterman
authored andcommitted
fix: increase context timeout to accommodate for slower machines in Test_checkForUnprivilegedVault (elastic#8374)
* fix: increase context timeout to accommodate for slower machines in Test_checkForUnprivilegedVault * fix: SA1019 logp.NewInMemory is deprecated
1 parent dcb0047 commit 0f97203

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
@@ -94,7 +94,7 @@ func Test_checkForUnprivilegedVault(t *testing.T) {
9494
for _, tt := range tests {
9595
t.Run(tt.name, func(t *testing.T) {
9696
tempDir := t.TempDir()
97-
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
97+
ctx, cancel := context.WithTimeout(t.Context(), 20*time.Second)
9898
defer cancel()
9999
testVaultPath := filepath.Join(tempDir, filepath.Base(paths.AgentVaultPath()))
100100

@@ -177,7 +177,7 @@ func TestNotifyFleetAuditUnenroll(t *testing.T) {
177177
err: fmt.Errorf("unretryable return status: 409"),
178178
}}
179179

180-
log, _ := logp.NewInMemory("test", zap.NewDevelopmentEncoderConfig())
180+
log, _ := logp.NewInMemoryLocal("test", zap.NewDevelopmentEncoderConfig())
181181
pt := progressbar.NewOptions(-1, progressbar.OptionSetWriter(io.Discard))
182182
var agentID agentInfo = "testID"
183183

0 commit comments

Comments
 (0)