You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(toolkit): Stub all instances of process.hrtime in records perfomance test (aws#5503)
## Problem
We're seeing some flakiness with the `TelemetrySpan records performance`
test. I _think_ it could be related to the fact we [stub certain calls
on
process.hrtime](https://github.com/aws/aws-toolkit-vscode/blob/master/packages/core/src/test/utilities/performance.ts#L21)
instead of stubbing all instances. This can potentially cause
[nodeClock](https://github.com/aws/aws-sdk-js/blob/master/lib/realclock/nodeClock.js#L4)
to use or not use stubbed values depending on when things are executed.
Previously we would see a failure this:
```
TypeError: Cannot read properties of undefined (reading '0')
at Object.now (/codebuild/output/src575830969/src/github.com/aws/aws-toolkit-vscode/node_modules/aws-sdk/lib/realclock/nodeClock.js:5:18)
```
## Solution
Stub all instances of process.hrtime during that test
0 commit comments