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

test: ensure proper cleanup between config tests #1373

Merged
merged 1 commit into from
Sep 23, 2019

Conversation

watson
Copy link
Contributor

@watson watson commented Sep 23, 2019

This was all the code that came out of trying to solve a weird CI related issue in #1114.

I thought it was best to submit it as a separate PR in case we want to backport it.

if (resettable) {
if (_asyncHook) _asyncHook.disable()
_asyncHook = asyncHook
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason not to just always do this? 🤔

Copy link
Contributor Author

@watson watson Sep 23, 2019

Choose a reason for hiding this comment

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

Good question... I did so in the first iteration but I wasn't 100% sure if there were any implications of keeping a reference to this object so it couldn't be garbage collected. This way it only kept it around during testing - but it's probably irrelevant 🤷‍♂

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair. Approved anyway just to get the fix in. I can clean it up later. 🤔

Copy link
Contributor

@Qard Qard left a comment

Choose a reason for hiding this comment

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

Approving just to get this fixed. I'd like to figure out at some point though if we can just always do this or find another way that's a bit cleaner. 🤔

@watson
Copy link
Contributor Author

watson commented Sep 23, 2019

jenkins run the tests please

@Qard Qard merged commit 27dffd8 into elastic:master Sep 23, 2019
@watson watson deleted the test-config branch September 24, 2019 06:25
@watson watson added the backport:2.x This PR should be backported to the 2.x branch label Sep 24, 2019
watson added a commit to watson/apm-agent-nodejs that referenced this pull request Sep 24, 2019
watson added a commit to watson/apm-agent-nodejs that referenced this pull request Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:2.x This PR should be backported to the 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants