aws/aws-toolkit-vscode

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

Hweinstock opened this issue · 1 comments

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',
})
})
})

Unable to reproduce, appears to be very rare or potentially a "one-off": #6001.

Reopen if able to reproduce, or witnessed again.