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

Improve Http Telemetry tests #50226

Merged
merged 1 commit into from
Apr 6, 2021
Merged

Conversation

MihaZupan
Copy link
Member

Replace Task.Delay(hopefullyEnoughTime) with actually waiting for event counters (following what we did in Sockets telemetry tests).

While I was changing the code, I added the asserts for ActivityIds.

Fixes #46075
Fixes #46073
Fixes #41723

@MihaZupan MihaZupan added this to the 6.0.0 milestone Mar 25, 2021
@MihaZupan MihaZupan requested a review from a team March 25, 2021 04:09
@ghost
Copy link

ghost commented Mar 25, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Replace Task.Delay(hopefullyEnoughTime) with actually waiting for event counters (following what we did in Sockets telemetry tests).

While I was changing the code, I added the asserts for ActivityIds.

Fixes #46075
Fixes #46073
Fixes #41723

Author: MihaZupan
Assignees: -
Labels:

area-System.Net.Http

Milestone: 6.0.0

@MihaZupan

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@MihaZupan
Copy link
Member Author

/azp run runtime-libraries-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@ManickaP ManickaP left a comment

Choose a reason for hiding this comment

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

LGTM, thanks. Hope it helps 😄


private static async Task WaitForEventCountersAsync(ConcurrentQueue<(EventWrittenEventArgs Event, Guid ActivityId)> events)
{
DateTime startTime = DateTime.UtcNow;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
DateTime startTime = DateTime.UtcNow;
long startTime = Environment.TickCount64;

It might not matter here since the timeout is 30s, but every time I see DateTime used like this, I'm a bit wary.

@MihaZupan
Copy link
Member Author

MihaZupan commented Mar 25, 2021

There are 2 relevant test failures here I am still looking into
- One failure with the RequestLeftQueue test timing out
- One failure with the RequestLeftQueue ActivityIds mismatch on H2

I misread the stack trace - there was only 1 failure on osx related to ordering.
We should see fewer failures with this change.

@MihaZupan MihaZupan merged commit 8b6f3ce into dotnet:main Apr 6, 2021
@ghost ghost locked as resolved and limited conversation to collaborators May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.