From f0daa3d664c4913019665214afd0eb65fdf561ae Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Oct 2025 17:09:00 +0000 Subject: [PATCH 1/2] Initial plan From b1c14705a1b3e4121b32c474e40af601f83b44d5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Oct 2025 17:31:34 +0000 Subject: [PATCH 2/2] Replace fixed delay with exponential backoff polling in PlainExecutable_ExtensionMode_SupportedDebugMode_RunsInIde test Co-authored-by: karolz-ms <15271049+karolz-ms@users.noreply.github.com> --- tests/Aspire.Hosting.Tests/Dcp/DcpExecutorTests.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/Aspire.Hosting.Tests/Dcp/DcpExecutorTests.cs b/tests/Aspire.Hosting.Tests/Dcp/DcpExecutorTests.cs index 426057108ec..743d50e3019 100644 --- a/tests/Aspire.Hosting.Tests/Dcp/DcpExecutorTests.cs +++ b/tests/Aspire.Hosting.Tests/Dcp/DcpExecutorTests.cs @@ -1571,8 +1571,13 @@ public async Task PlainExecutable_ExtensionMode_SupportedDebugMode_RunsInIde() // Act await appExecutor.RunApplicationAsync(); - await Task.Delay(2000); - // Assert + // Assert - Poll for the expected number of executables with exponential backoff + // This replaces the fixed 2-second delay which was both too short and source of test instability + await AsyncTestHelpers.AssertIsTrueRetryAsync( + () => kubernetesService.CreatedResources.OfType().Count() == 2, + "Expected 2 executables to be created", + retries: 12); // With exponential backoff formula: (i+1)^2 * 50ms, this gives ~33 seconds total timeout + var dcpExes = kubernetesService.CreatedResources.OfType().ToList(); Assert.Equal(2, dcpExes.Count);