Skip to content

[tests] Failing test on CI - DistributedApplicationTests.ProxylessAndProxiedEndpointBothWorkOnSameResource #4599

@radical

Description

@radical

#4500 enables extra Aspire.Hosting.Tests to run on the build machine. Prior to this they were never run on CI.

Aspire.Hosting.Tests.DistributedApplicationTests.ProxylessAndProxiedEndpointBothWorkOnSameResource fails because the first client.GetStringAsync($"{httpEndPoint}urls" returned only the http endpoint. But the second invocation got both http, and https. Adding a sufficient delay before hitting the /urls endpoints makes the test pass though.

The tests have an existing class for the hook which I tried to use here - https://gist.github.com/radical/7ef257229178c36f6b72ffd09f7e0b79#file-test-cs-L22-L27

But running the test with CWLs added to print the results from /urls:

Got urls from http://localhost:1234/urls: ["http://localhost:1234"]
Got urls from https://localhost:57048/urls: ["http://localhost:1234","https://localhost:57051"]

The first call is missing the https endpoint. Did the AfterEndpointsAllocatedAsync get invoked too early? Or am I missing something else?

(related thread: #4500 (comment))
cc @ReubenBond @DamianEdwards @eerhardt

Build Information

Build:
Build error leg or test failing: Aspire.Hosting.Tests.DistributedApplicationTests.ProxylessAndProxiedEndpointBothWorkOnSameResource
Pull request:

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "Expected: \"[\"http://localhost:1234\"]\"",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": true
}

Last 10 failures:

Run date Test Name

-- Updated on 5/6/2025 3:39:57 AM UTC

Summary

Last 40 Total failed / total runs
0 0 / 100

Metadata

Metadata

Assignees

Labels

area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplicationquarantined-testQuarantined tests that run only in the Outerloop Tests workflowtesting ☑️

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions