Skip to content

Port to 9.0.1xx: Fix processing non-public classes and generic types in AssemblyScheduler.cs (#43377)#43534

Merged
tmat merged 1 commit intodotnet:release/9.0.1xxfrom
tmat:HelixTestUpdate
Sep 18, 2024
Merged

Port to 9.0.1xx: Fix processing non-public classes and generic types in AssemblyScheduler.cs (#43377)#43534
tmat merged 1 commit intodotnet:release/9.0.1xxfrom
tmat:HelixTestUpdate

Conversation

@tmat
Copy link
Copy Markdown
Member

@tmat tmat commented Sep 18, 2024

While looking at why #43295 is having issues running on Helix I noticed that we were passing -class "Microsoft.WebTools.AspireServer.UnitTests.MockFactory`1" to the test script which caused a parse error because of the backtick.

We shouldn't pass generic types since xunit can't do anything with it.

Additionally I noticed that we were passing some nested types even though they were internal. This is because we didn't check the visibility correctly, we must use TypeAttributes.VisibilityMask to check for just the visibility (the same also applies to checking for class). See https://learn.microsoft.com/en-us/dotnet/api/system.reflection.typeattributes?view=net-8.0&redirectedfrom=MSDN#examples

…ler.cs (dotnet#43377)

While looking at why dotnet#43295 is having issues running on Helix I noticed that we were passing ``-class "Microsoft.WebTools.AspireServer.UnitTests.MockFactory`1"`` to the test script which caused a parse error because of the backtick.

We shouldn't pass generic types since xunit can't do anything with it.

Additionally I noticed that we were passing some nested types even though they were internal.
This is because we didn't check the visibility correctly, we must use `TypeAttributes.VisibilityMask` to check for just the visibility (the same also applies to checking for class).
See https://learn.microsoft.com/en-us/dotnet/api/system.reflection.typeattributes?view=net-8.0&redirectedfrom=MSDN#examples
@ghost ghost added Area-Infrastructure untriaged Request triage from a team member labels Sep 18, 2024
@tmat
Copy link
Copy Markdown
Member Author

tmat commented Sep 18, 2024

@akoeplinger porting to .NET 9

@tmat tmat merged commit 52baed1 into dotnet:release/9.0.1xx Sep 18, 2024
@tmat tmat deleted the HelixTestUpdate branch September 18, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Infrastructure untriaged Request triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants