Skip to content
This repository was archived by the owner on Jul 5, 2020. It is now read-only.

Fix 503 WCF test that sometimes fails because of intermediate request#908

Merged
lmolkova merged 2 commits intodevelopfrom
lmolova/fixFlackyWebFuns
May 9, 2018
Merged

Fix 503 WCF test that sometimes fails because of intermediate request#908
lmolkova merged 2 commits intodevelopfrom
lmolova/fixFlackyWebFuns

Conversation

@lmolkova
Copy link
Copy Markdown

@lmolkova lmolkova commented May 7, 2018

After merging #898 I found that some Web Func testsfail sometimes in external, hosted build.

It happens with WCF app tests because intermediate request is sometimes tracked for non-reported handlers.

To fix it, I started tracking intermediate request together with 'main' request. I.e. intermediate requests would never be reported for non-tracked handlers. After ~15 hosted test runs, all web func tests pass.
It should also reduce the noise for users.

  • I ran Unit Tests locally.

if (this.childRequestTrackingSuppressionModule?.OnEndRequest_ShouldLog(context) ?? true)
{
var intermediateRequest = (RequestTelemetry)context.Items[IntermediateRequestHttpContextKey];
if (intermediateRequest != null)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a guarantee that internal request will reach this OnEndRequest handler faster all the time?
I remember that with TransferRequestHandler we didn't have such a guarantee as per @MS-TimothyMothra.
Without that, the tests may still fail very rarely but customers with high load of requests would sometimes see both reported vs. one reported.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yes, it is guaranteed by TelemteryCorrelation package - it first fires event that there was 'intermediate activity' and right after that would report that request was ended.

This change only reduces noise in the reporting and tests only helped to notice this noise

@lmolkova lmolkova merged commit df88fad into develop May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants