Skip to content

DistributedApplicationTestingBuilder should disable interaction service by deault #18005

@afscrome

Description

@afscrome

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

I have some tests that needed to access the telemetry API, so I had to enable the dashboard:

      var builder = DistributedApplicationTestingBuilder.Create([], (opt, _) =>
      {
         opt.DisableDashboard = false;
         opt.DashboardApplicationName = TestContext.CurrentContext?.Test.Name;
      });

However my test ended up deadlocking as one of my resources ended up trying to use the interaction service as InteractionService.IsAvailable was now true.

Describe the solution you'd like

I was able to fix my problem by explicitly disabling the interaction service in my tests

builder.Configuration["ASPIRE_INTERACTIVITY_ENABLED"] = "false";

But it left me wondering if this should be the default for DistributedApplicationTestingBuilder? Currently the value seems to be based simply on whether the dashboard is enabled. But with the dashboard now hosting APIs, it is starting to be used in non interactive scenarios.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-app-testingIssues pertaining to the APIs in Aspire.Hosting.Testingtriage:bot-seenAspire triage bot has seen this issue
    No fields configured for Feature.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions