@@ -20,7 +20,8 @@ import { getCredentialsFilename } from '../../auth/credentials/sharedCredentials
2020import { Connection , isIamConnection , isSsoConnection , scopesSsoAccountAccess } from '../../auth/connection'
2121import { AuthNode , createDeleteConnectionButton , promptForConnection } from '../../auth/utils'
2222import { Credentials } from '@aws-sdk/types'
23- import { waitUntil } from '../../shared'
23+ import { sleep , waitUntil } from '../../shared'
24+ import { isWin } from '../../shared/vscode/env'
2425
2526const ssoProfile = createSsoProfile ( )
2627const scopedSsoProfile = createSsoProfile ( { scopes : [ 'foo' ] } )
@@ -533,10 +534,20 @@ describe('Auth', function () {
533534 console . log ( 'Deleting the credentials file' )
534535 await fs . delete ( getCredentialsFilename ( ) )
535536
537+ console . log ( 'sleeping first time for a second' )
538+ if ( isWin ( ) ) {
539+ await sleep ( 1000 )
540+ }
541+
536542 const newCreds = { ...initialCreds , accessKey : 'y' , secretKey : 'y' }
537543 console . log ( 'Regenerating credentials file' )
538544 await UserCredentialsUtils . generateCredentialsFile ( newCreds )
539545
546+ console . log ( 'sleeping second time for a second' )
547+ if ( isWin ( ) ) {
548+ await sleep ( 1000 )
549+ }
550+
540551 const statsAfterRegen = await fs . stat ( getCredentialsFilename ( ) )
541552 const contentAfterRegen = await fs . readFileText ( getCredentialsFilename ( ) )
542553 const credsAreUpdated = ( creds : Credentials ) => {
0 commit comments