@@ -19,7 +19,7 @@ import { UserCredentialsUtils } from '../../shared/credentials/userCredentialsUt
1919import { getCredentialsFilename } from '../../auth/credentials/sharedCredentialsFile'
2020import { Connection , isIamConnection , isSsoConnection , scopesSsoAccountAccess } from '../../auth/connection'
2121import { AuthNode , createDeleteConnectionButton , promptForConnection } from '../../auth/utils'
22- import { waitUntil } from '../../shared'
22+ import { isWin } from '../../shared/vscode/env '
2323
2424const ssoProfile = createSsoProfile ( )
2525const scopedSsoProfile = createSsoProfile ( { scopes : [ 'foo' ] } )
@@ -508,6 +508,9 @@ describe('Auth', function () {
508508 } )
509509 for ( const _ of Array . from ( { length : 1000 } , ( i ) => i ) ) {
510510 it ( 'does not cache if the credentials file changes' , async function ( ) {
511+ if ( isWin ( ) ) {
512+ this . retries ( 5 )
513+ }
511514 const initialCreds = {
512515 profileName : 'default' ,
513516 accessKey : 'x' ,
@@ -527,15 +530,9 @@ describe('Auth', function () {
527530 await fs . delete ( getCredentialsFilename ( ) )
528531 const newCreds = { ...initialCreds , accessKey : 'y' , secretKey : 'y' }
529532 await UserCredentialsUtils . generateCredentialsFile ( newCreds )
530- const didUpdate = await waitUntil (
531- async ( ) => ( await fs . readFileText ( getCredentialsFilename ( ) ) ) !== contentBefore ,
532- {
533- timeout : 5000 ,
534- truthy : true ,
535- }
536- )
533+ const contentAfter = await fs . readFileText ( getCredentialsFilename ( ) )
537534
538- assert . ok ( didUpdate , 'Expected the credentials file to be updated' )
535+ assert . ok ( contentBefore !== contentAfter )
539536
540537 assert . deepStrictEqual ( await conn . getCredentials ( ) , {
541538 accessKeyId : newCreds . accessKey ,
0 commit comments