-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failure in test asyncOpsSanitizer when no hint is available for op #13729
Comments
This might be related (or the exact issue reported by OP) but in order to debug I've been using the following function to log before and after certain calls when I can't figure out where the open op is coming from: function getOpenOps() {
const metrics = Deno.metrics();
return {
...metrics,
ops: Object.keys(metrics.ops).reduce((acc: any, key: string) => {
const op = metrics.ops[key];
if (!op) {
console.log('Missing op for key', key);
}
if (op && op.opsCompleted !== op.opsDispatched) {
acc[key] = op;
}
return acc;
}, {}),
};
} I noticed I had to check using
|
Whoops, I know the root cause for this. My bad. I'll fix it soon. |
May we have an update, ty vm! |
Discord shows Luca is out of office until March 3rd. I'm guessing it won't be fixed until after that. I'd recommend just downgrading to Deno 1.18 until this is fixed. |
I don't have a clear reproduction path for this issue but I dug into the 40_testing.js code and I believe I found the cause of the issue. A user of my test_suite module opened an issue saying they were getting an error when upgrading to the newest version that uses the test step API. The user reported they are using Deno 1.19. Looking at the error message, it appeared to actually be an issue with Deno's test runner.
The Deno.metrics().ops object has 281 keys. The OP_DETAILS object in 40_testing.js only has 67 of those keys.
In the asyncOpSanitizer, if there is a difference in ops dispatched and completed, it will try getting hint information from the OP_DETAILS here using destructuring assignment (shown below). If there isn't a hint in OP_DETAILS for the key, then the value returned from
OP_DETAILS[key]
is going to return undefined and you can't destructure undefined.If the key happens to be one that is undefined, this will throw the following error.
The text was updated successfully, but these errors were encountered: