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

Flaky AspNetCore instrumentation unit tests #4763

Closed
utpilla opened this issue Aug 11, 2023 · 1 comment · Fixed by #4785
Closed

Flaky AspNetCore instrumentation unit tests #4763

utpilla opened this issue Aug 11, 2023 · 1 comment · Fixed by #4785
Assignees
Labels
infra Infra work - CI/CD, code coverage, linters

Comments

@utpilla
Copy link
Contributor

utpilla commented Aug 11, 2023

CI checks for build are failing intermittently because of AspNetCore instrumentation unit tests failing with System.InvalidOperationException : Unable to build IHost

These are usually only observed for IncomingRequestsCollectionsIsAccordingToTheSpecTests.

Here are few sample PR runs:

@utpilla utpilla added the infra Infra work - CI/CD, code coverage, linters label Aug 11, 2023
@TimothyMothra
Copy link
Contributor

TimothyMothra commented Aug 11, 2023

Tests that failed:

  • OpenTelemetry.Instrumentation.AspNetCore.Tests.
    • IncomingRequestsCollectionsIsAccordingToTheSpecTests.SuccessfulTemplateControllerCallGeneratesASpan_Old
    • IncomingRequestsCollectionsIsAccordingToTheSpecTests_New.SuccessfulTemplateControllerCallGeneratesASpan_New

Runtime; net6.0

Call stack:

Error Message:
   System.InvalidOperationException : Unable to build IHost
  Stack Trace:
     at Microsoft.Extensions.Hosting.HostFactoryResolver.HostingListener.CreateHost()
   at Microsoft.Extensions.Hosting.HostFactoryResolver.<>c__DisplayClass8_0.<ResolveHostFactory>b__0(String[] args)
   at Microsoft.AspNetCore.Mvc.Testing.DeferredHostBuilder.Build()
   at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.CreateHost(IHostBuilder builder)
   at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.DelegatedWebApplicationFactory.CreateHost(IHostBuilder builder)
   at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.ConfigureHostBuilder(IHostBuilder hostBuilder)
   at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.EnsureServer()
   at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.CreateDefaultClient(DelegatingHandler[] handlers)

These tests are nearly identical except for inspecting different attributes (Old vs New).
These were split into different classes because they were having concurrency issues when in the same class.

This is the exact same call stack as was reported here: dotnet/runtime#60891 which was described as a timeout issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra Infra work - CI/CD, code coverage, linters
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants