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

Fix run_plugins_spec test leaking into other tests, other flake in request_spec #4600

Merged
merged 3 commits into from
Jul 2, 2019

Conversation

flotwig
Copy link
Contributor

@flotwig flotwig commented Jun 28, 2019

Fixes #4481

Also increases the timeout on the 4x retry test for ECONNRESET, I could never get it to flake locally, only in CI, assuming it's just random slowdown. Bumping timeout from 100 to 250ms should fix this.

@flotwig flotwig changed the title [WIP] Fix run_plugins_spec test leaking into other tests [WIP] Fix run_plugins_spec test leaking into other tests, other flake in request_spec Jun 28, 2019
@flotwig flotwig changed the title [WIP] Fix run_plugins_spec test leaking into other tests, other flake in request_spec Fix run_plugins_spec test leaking into other tests, other flake in request_spec Jul 2, 2019
@flotwig flotwig requested a review from a team July 2, 2019 15:58
@@ -72,7 +72,7 @@ describe "lib/plugins/child/run_plugins", ->
@ipc.on.withArgs("load").yields({})
runPlugins(@ipc, "plugins-file")

@ipc.send = (event, errorType, pluginsFile, stack) ->
@ipc.send = _.once (event, errorType, pluginsFile, stack) ->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving but why can't we use sinon to handle the mocking behavior since it's automatically torn down at the end of the test?

If that doesn't work - then we have something else still running async in the background causing the leak into another test - and likely the code needs to be refactored to properly handle this.

@brian-mann brian-mann merged commit 16adce5 into develop Jul 2, 2019
@flotwig flotwig deleted the issue-4481 branch January 24, 2022 18:18
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.

run_plugins_spec test is leaking into other tests
2 participants