Skip to content

Microsoft.AspNetCore.Hosting.Tests.HostingApplicationTests.IHttpActivityFeatureIsPopulated #35142

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

Closed
davidfowl opened this issue Aug 7, 2021 · 5 comments · Fixed by #48371
Closed
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions test-fixed
Milestone

Comments

@davidfowl
Copy link
Member

Failing Test(s)

  • Microsoft.AspNetCore.Hosting.Tests.HostingApplicationTests.IHttpActivityFeatureIsPopulated

Error Message

Assert.NotEqual() Failure
Expected: Not Activity { ActivityTraceFlags = None, Baggage = [], Context = System.Diagnostics.ActivityContext, DisplayName = "Microsoft.AspNetCore.Hosting.HttpRequestIn", Duration = 00:00:00, ... }
Actual:   Activity { ActivityTraceFlags = None, Baggage = [], Context = System.Diagnostics.ActivityContext, DisplayName = "Microsoft.AspNetCore.Hosting.HttpRequestIn", Duration = 00:00:00, ... }

Stacktrace

   at Microsoft.AspNetCore.Hosting.Tests.HostingApplicationTests.IHttpActivityFeatureIsPopulated() in /_/src/Hosting/Hosting/test/HostingApplicationTests.cs:line 122

Logs

[xUnit.net 00:00:01.21]     Microsoft.AspNetCore.Hosting.Tests.HostingApplicationTests.IHttpActivityFeatureIsPopulated [FAIL]
[xUnit.net 00:00:01.21]       Assert.NotEqual() Failure
[xUnit.net 00:00:01.21]       Expected: Not Activity { ActivityTraceFlags = None, Baggage = [], Context = System.Diagnostics.ActivityContext, DisplayName = "Microsoft.AspNetCore.Hosting.HttpRequestIn", Duration = 00:00:00, ... }
[xUnit.net 00:00:01.21]       Actual:   Activity { ActivityTraceFlags = None, Baggage = [], Context = System.Diagnostics.ActivityContext, DisplayName = "Microsoft.AspNetCore.Hosting.HttpRequestIn", Duration = 00:00:00, ... }
[xUnit.net 00:00:01.21]       Stack Trace:
[xUnit.net 00:00:01.21]         /_/src/Hosting/Hosting/test/HostingApplicationTests.cs(122,0): at Microsoft.AspNetCore.Hosting.Tests.HostingApplicationTests.IHttpActivityFeatureIsPopulated()

Build

https://dev.azure.com/dnceng/public/_build/results?buildId=1280595&view=ms.vss-test-web.build-test-results-tab&runId=37844528&resultId=103322&paneView=debug

@shirhatti
Copy link
Contributor

The only theory I could come up with any credence is that there is another test running concurrently that changes the ActivityIdFormat and hence I'll also need to specify a SampleUsingParentId delegate.

That said I can't find any test changing the ActivityIdFormat

@adityamandaleeka
Copy link
Member

Closing until this happens again...

@Tratcher
Copy link
Member

Tratcher commented Aug 27, 2021

Happened again.
https://dev.azure.com/dnceng/public/_build/results?buildId=1322326&view=ms.vss-test-web.build-test-results-tab&runId=38846932&resultId=117945&paneView=debug

   Assert.NotEqual() Failure
Expected: Not Activity { ActivityTraceFlags = None, Baggage = [], Context = System.Diagnostics.ActivityContext, DisplayName = "Microsoft.AspNetCore.Hosting.HttpRequestIn", Duration = 00:00:00, ... }
Actual:   Activity { ActivityTraceFlags = None, Baggage = [], Context = System.Diagnostics.ActivityContext, DisplayName = "Microsoft.AspNetCore.Hosting.HttpRequestIn", Duration = 00:00:00, ... }
  Stack Trace:
     at Microsoft.AspNetCore.Hosting.Tests.HostingApplicationTests.IHttpActivityFeatureIsPopulated() in /_/src/Hosting/Hosting/test/HostingApplicationTests.cs:line 122

@Tratcher Tratcher reopened this Aug 27, 2021
@adityamandaleeka adityamandaleeka added this to the Next sprint planning milestone Aug 27, 2021
@ghost
Copy link

ghost commented Aug 27, 2021

Thanks for contacting us.

We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@JamesNK
Copy link
Member

JamesNK commented Apr 14, 2023

Hasn't failed lately. Added some extra asserts in #47679

If it fails again - my theory is CreateActivity to create the nested activity is returning null - then there should be some more info.

@ghost ghost locked as resolved and limited conversation to collaborators Jun 22, 2023
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions test-fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants