Skip to content

unreliable test: FileSystem, rename, source file does not exist at first, but eventually appears #6002

@Hweinstock

Description

@Hweinstock

Failed on mac stable: https://github.com/aws/aws-toolkit-vscode/actions/runs/11823977700/job/32944478705

FileSystem
       rename()
         source file does not exist at first, but eventually appears:

      AssertionError [ERR_ASSERTION]: telemetry metric not found: "ide_fileSystem"
      + expected - actual

      -false
      +true

it('source file does not exist at first, but eventually appears', async () => {
const oldPath = testFolder.pathFrom('oldFile.txt')
const newPath = testFolder.pathFrom('newFile.txt')
const result = fs.rename(oldPath, newPath)
// this file is created after the first "exists" check fails, the following check should pass
void testutil.toFile('hello world', oldPath)
await result
testutil.assertTelemetry('ide_fileSystem', {
action: 'rename',
result: 'Succeeded',
reason: 'RenameRaceCondition',
})
})
})

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions