Skip two failing tests and add SkipOnHelixCondition attribute#38203
Merged
Conversation
Add SkipOnHelixConditionAttribute to the ConditionalFact infrastructure in EFCore.Specification.Tests. Use it on Csproj_metadata_can_be_extracted and File_based_app_can_be_built since these tests require a full dotnet SDK which is not available on Helix agents. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add SkipOnHelixConditionAttribute to the ConditionalFact infrastructure in EFCore.Specification.Tests. Replace all inline HELIX_WORKITEM_ROOT checks across 31 SqlServer type test files and 2 dotnet-ef tests with the new [SkipOnHelixCondition] attribute. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the EF Core test infrastructure and test suites to centralize Helix-specific skipping logic and to skip two dotnet-ef tests which depend on having a full .NET SDK available on the executing agent.
Changes:
- Introduces
SkipOnHelixConditionAttribute(anITestCondition) to skip tests when running under Helix (HELIX_WORKITEM_ROOTis set). - Replaces ad-hoc Helix environment-variable early-return logic across SQL Server type tests with
[SkipOnHelixCondition]. - Updates
dotnet-ef.Teststo use conditional test infrastructure and skip two SDK-dependent tests on CI; also renames a pipeline job display name.
Reviewed changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/dotnet-ef.Tests/dotnet-ef.Tests.csproj | Adds reference to EFCore.Specification.Tests to use conditional xUnit test infrastructure. |
| test/dotnet-ef.Tests/ProjectTest.cs | Converts two tests to conditional tests and skips them on CI. |
| test/EFCore.SqlServer.FunctionalTests/Types/Temporal/SqlServerTimeSpanTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Temporal/SqlServerTimeOnlyTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Temporal/SqlServerDateTimeTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Temporal/SqlServerDateTimeOffsetTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Temporal/SqlServerDateTime2TypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Temporal/SqlServerDateOnlyTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Numeric/SqlServerShortTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Numeric/SqlServerLongTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Numeric/SqlServerIntTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Numeric/SqlServerFloatTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Numeric/SqlServerDoubleTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Numeric/SqlServerDecimalTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Numeric/SqlServerByteTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Miscellaneous/SqlServerStringTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Miscellaneous/SqlServerGuidTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Miscellaneous/SqlServerByteArrayTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Miscellaneous/SqlServerBoolTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Geometry/SqlServerGeometryPolygonTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Geometry/SqlServerGeometryPointTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Geometry/SqlServerGeometryMultiPolygonTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Geometry/SqlServerGeometryMultiPointTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Geometry/SqlServerGeometryMultiLineStringTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Geometry/SqlServerGeometryLineStringTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Geometry/SqlServerGeometryCollectionTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Geography/SqlServerGeographyPolygonTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Geography/SqlServerGeographyPointTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Geography/SqlServerGeographyMultiPolygonTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Geography/SqlServerGeographyMultiPointTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Geography/SqlServerGeographyMultiLineStringTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Geography/SqlServerGeographyLineStringTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.SqlServer.FunctionalTests/Types/Geography/SqlServerGeographyCollectionTypeTest.cs | Replaces inline Helix env-var skip with [SkipOnHelixCondition]. |
| test/EFCore.Specification.Tests/TestUtilities/Xunit/SkipOnHelixConditionAttribute.cs | Adds reusable Helix skip condition attribute (HELIX_WORKITEM_ROOT). |
| azure-pipelines-public.yml | Renames validate job display name to “Job Results”. |
| azure-pipelines-internal-tests.yml | Renames validate job display name to “Job Results”. |
roji
approved these changes
May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several
dotnet-eftests (Csproj_metadata_can_be_extracted,File_based_app_can_be_built) fail on AzDo agents because they shell out todotnet restore/dotnet buildwhich requires a full SDK that is not installed there. Similarly, 31 SqlServer type tests had inlineHELIX_WORKITEM_ROOTenvironment variable checks to early-return on Helix.This PR introduces a reusable
[SkipOnHelixCondition]attribute in theConditionalFacttest infrastructure and replaces all ad-hoc Helix skip logic with it.Changes
SkipOnHelixConditionAttributeinEFCore.Specification.Tests-- anITestConditionthat checksHELIX_WORKITEM_ROOT, usable on any[ConditionalFact]/[ConditionalTheory]testdotnet-ef.Tests-- added project reference toEFCore.Specification.Teststo get access toConditionalFactand the new attribute; marked both SDK-dependent tests with[SkipOnCICondition]if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT") is not null) { return; }blocks with[SkipOnHelixCondition], keeping the// TODOcomments referencing SQL Server: ExecuteUpdate_within_json_to_nonjson_column tests failing with Unexpected character '⸤' #36746Validate Job Results->Job Resultsin bothazure-pipelines-public.ymlandazure-pipelines-internal-tests.yml