Skip to content

Commit a5225f9

Browse files
committed
try a long interval
1 parent 1161e54 commit a5225f9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

packages/core/src/test/credentials/auth.test.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -529,12 +529,15 @@ describe('Auth', function () {
529529
const newCreds = { ...initialCreds, accessKey: 'y', secretKey: 'y' }
530530
await UserCredentialsUtils.generateCredentialsFile(newCreds)
531531
const contentAfter = await fs.readFileText(getCredentialsFilename())
532-
const statAfter = await fs.stat(getCredentialsFilename())
533532

534-
assert.ok(contentBefore !== contentAfter)
533+
assert.notDeepStrictEqual(contentBefore, contentAfter)
535534

536-
await waitUntil(async () => statBefore !== (await fs.stat(getCredentialsFilename())), { timeout: 5000 })
537-
assert.notDeepStrictEqual(statBefore, statAfter, 'Credentials file update failed')
535+
const updated = await waitUntil(async () => statBefore !== (await fs.stat(getCredentialsFilename())), {
536+
timeout: 20000,
537+
interval: 1000,
538+
truthy: true,
539+
})
540+
assert.ok(updated, 'Credentials file update failed')
538541

539542
assert.deepStrictEqual(await conn.getCredentials(), {
540543
accessKeyId: newCreds.accessKey,

0 commit comments

Comments
 (0)