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 bad requests causing unit tests to hang #478

Merged
merged 4 commits into from Jan 23, 2019
Merged

Conversation

markwolff
Copy link
Contributor

@markwolff markwolff commented Jan 15, 2019

Fixes #475

  • Fix hanging mocha tests
    • Stubbed some http(s).request methods in unit tests (fixes our unit tests)
    • Fix stubbed http request from returning undefined statusCode
    • Unref diskretry timer so that we don't block instrumented app from terminating
  • Upgrade to latest mocha version (edit: Staying with 3.5 because it breaks node 0.x, but added --no-exit)

Mocha 4+ does not force quit tests on termination, so tests involving application insights would hang for 30-60 seconds due to fetchAppId getting an undefined status code and retrying.

@markwolff markwolff changed the title fix hanging requests fix bad requests causing unit tests to hang Jan 16, 2019
@markwolff markwolff requested a review from ramthi January 23, 2019 01:21
@markwolff markwolff merged commit 369b91d into develop Jan 23, 2019
@markwolff markwolff deleted the markwolff/fix-mocha branch January 23, 2019 17:27
@markwolff markwolff mentioned this pull request Feb 20, 2019
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.

Perform UnitTest with real application insights too long
3 participants