Skip to content

[Engineering] TokenResolver "should end polling" - All Builds Have the Same Failing Test #1787

@mdrichardson

Description

@mdrichardson

All of the builds have one test that is currently failing with:

image

I believe this has something to do with the tests being run in Node v12; they pass with Node v11 and lower.

I'm still digging into why this is, but so far, I've found that:

In the test, we pass in a log here:

TokenResolver.checkForOAuthCards(adapter, context, activity, log);

Eventually, the log does get 'End Polling' pushed to it here:

if (log)
    log.push('End polling');
return;

However, log is an empty array by the time it gets back to the assert:

assert(log.indexOf('End polling') !== -1, 'did not end polling');

This works in the latest v11 of Node, v11.15.0. This breaks in the next release, which is the first of v12, v12.0.0. I wasn't able to find anything that stands out in the changelog.

This could probably be fixed if we move everything to async/await, but I'm not sure. There might be an easier way.

Metadata

Metadata

Assignees

Labels

P1Painful if we don't fix, won't block releasingR9Release 9 - May 15th, 2020

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions