Skip to content
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

Pin mocha to v8 as short-term test failure fix #2017

Merged
merged 1 commit into from
Jan 10, 2022
Merged

Conversation

wbt
Copy link
Contributor

@wbt wbt commented Jan 10, 2022

Picking up the thread from #1988, we have been seeing test failures recently.

This PR aims to address that the quickest & easiest way. The better way is to update the test to loop over listeners looking for the expected one instead, and update mocha to run with the latest.

Reasoning: Looking at actions, as noted in the other thread the 'v3.3.4' commit appears to be the culprit. What changed there? Not much. However, looking at package lock, I see things that mocha was updated from 8.0.1 to 8.4.0. In the "fix all high-severity vulnerabilities from npm audit" commit before the npm publication but after the GitHub tag, mocha was updated to 9.1.3, a breaking change.

In pinning mocha to different versions and re-running tests, I found that the breaking change was introduced on the feature version of mocha’s update from 8.1.3 to 8.2.0, i.e. definitely somewhere in here. I’m going to make a pretty strong guess it was this commit in this PR, probably in this line (though this new one seemed suspicious, I don't think that's as likely). There are multiple places where new lines remove or verify removal of unhandled rejection listeners, so that’s not exactly by accident.

I'm not about to try & undo that commit. This PR pins mocha to the last version before that breaking change, and I recommend that it soon be replaced by one that actually fixes the test and updates Mocha.

@wbt wbt merged commit 955dffa into master Jan 10, 2022
@wbt wbt deleted the fix-test-failures-fast branch January 10, 2022 21:28
@DABH
Copy link
Contributor

DABH commented Jan 10, 2022

@wbt You are a rockstar! Seriously, thank you for getting to the bottom of this. I think we are unblocked for v3.4.0 now. Cheers!

@wbt
Copy link
Contributor Author

wbt commented Jan 10, 2022

Issue #2018 has been created to track the better solution.

@wbt wbt mentioned this pull request Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants