-
Notifications
You must be signed in to change notification settings - Fork 140
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
Perform UnitTest with real application insights too long #475
Comments
This SDK is optimized for use in long-running server scenarios, rather than quick termination. One such optimization is that it will wait for 15 seconds before sending telemetry to optimize network traffic by batching all of the telemetry into a single request. There are other optimizations in place similar to this - and I'm guessing that these are what impact its use within unit tests. Some things to try, in no particular order (you may need all of them, or only one):
If your tests don't actually need to emit telemetry, you can also use |
@guenogu which version of mocha are you using? |
@guenogu You can fix this for now by adding |
Hello,
I'm working on a Hapi server application.
I try to integrate the package
applicationinsights
to my application.My application is cover by unit test (mocha), but when I use a real instrumentation key the unit test execution is quite long ( >60s) and when the instrumentation key is a fake
ikey
then the execution is more performant (<3s).To help you to reproduce and understand my issue, I have push the code in this branch
https://github.com/guenogu/repro/tree/hapi-wreck-appinsights
Thanks for your help.
The text was updated successfully, but these errors were encountered: