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

Test failure in VS: System.UnauthorizedAccessException - StarterTemplateWithRedisCacheTests_PreviousTFM.ApiServiceWorks #8344

Open
radical opened this issue Mar 27, 2025 · 1 comment

Comments

@radical
Copy link
Member

radical commented Mar 27, 2025

I tried "run to failure" in VS but it always fails on the 2nd run. It needs ?a few seconds between runs. I'm not sure what holds the handle. Sleeping 5 sec doesn't help.

    Iteration 2)   Aspire.Templates.Tests.StarterTemplateWithRedisCacheTests_PreviousTFM.ApiServiceWorks(urlPrefix: "http://") 
      Duration: 1 ms

      Message: 
System.InvalidOperationException : Error deleting 'C:\Users\danmose\AppData\Local\Temp\templates-testroot'.
---- System.UnauthorizedAccessException : Access to the path 'aspire-starter_net8.0_02vddmn5_fu0.ApiService.dll' is denied.

      Stack Trace: 
<.ctor>g__CleanupTestRootPath|61_0() line 246
BuildEnvironment.ctor(Boolean useSystemDotNet, TemplatesCustomHive templatesCustomHive, String sdkDirName) line 184
<.cctor>b__64_2() line 50
Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
Lazy`1.CreateValue()
BuildEnvironment.get_ForCurrentSdkAndPreviousRuntime() line 56
BuildEnvironment.get_ForDefaultFramework() line 65
TemplateAppFixture.InitializeAsync() line 38
----- Inner Stack Trace -----
FileSystem.RemoveDirectoryRecursive(String fullPath, WIN32_FIND_DATA& findData, Boolean topLevel)
FileSystem.RemoveDirectory(String fullPath, Boolean recursive)
<.ctor>g__CleanupTestRootPath|61_0() line 223

    Iteration 1)   Aspire.Templates.Tests.StarterTemplateWithRedisCacheTests_PreviousTFM.ApiServiceWorks(urlPrefix: "http://") 
      Duration: 2.9 sec

      Standard Output: 
Waiting for resources to appear on the dashboard

I'll wait for @radical to finish work on these tests.

Originally posted by @danmoseley in #8191

@radical radical changed the title [Flaky test] System.UnauthorizedAccessException - StarterTemplateWithRedisCacheTests_PreviousTFM.ApiServiceWorks Test failure in VS: System.UnauthorizedAccessException - StarterTemplateWithRedisCacheTests_PreviousTFM.ApiServiceWorks Mar 27, 2025
@radical
Copy link
Member Author

radical commented Mar 27, 2025

@danmoseley I have split this from the original issue as it is a different error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant