Skip to content

Skip two failing tests and add SkipOnHelixCondition attribute#38203

Merged
AndriySvyryd merged 3 commits into
mainfrom
andriysvyryd/fix-csproj-metadata-test
May 1, 2026
Merged

Skip two failing tests and add SkipOnHelixCondition attribute#38203
AndriySvyryd merged 3 commits into
mainfrom
andriysvyryd/fix-csproj-metadata-test

Conversation

@AndriySvyryd
Copy link
Copy Markdown
Member

@AndriySvyryd AndriySvyryd commented May 1, 2026

Several dotnet-ef tests (Csproj_metadata_can_be_extracted, File_based_app_can_be_built) fail on AzDo agents because they shell out to dotnet restore/dotnet build which requires a full SDK that is not installed there. Similarly, 31 SqlServer type tests had inline HELIX_WORKITEM_ROOT environment variable checks to early-return on Helix.

This PR introduces a reusable [SkipOnHelixCondition] attribute in the ConditionalFact test infrastructure and replaces all ad-hoc Helix skip logic with it.

Changes

  • New SkipOnHelixConditionAttribute in EFCore.Specification.Tests -- an ITestCondition that checks HELIX_WORKITEM_ROOT, usable on any [ConditionalFact]/[ConditionalTheory] test
  • dotnet-ef.Tests -- added project reference to EFCore.Specification.Tests to get access to ConditionalFact and the new attribute; marked both SDK-dependent tests with [SkipOnCICondition]
  • 31 SqlServer type test files -- replaced inline if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT") is not null) { return; } blocks with [SkipOnHelixCondition], keeping the // TODO comments referencing SQL Server: ExecuteUpdate_within_json_to_nonjson_column tests failing with Unexpected character '⸤' #36746
  • Pipeline rename -- Validate Job Results -> Job Results in both azure-pipelines-public.yml and azure-pipelines-internal-tests.yml

AndriySvyryd and others added 3 commits April 30, 2026 21:46
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>
@AndriySvyryd AndriySvyryd changed the title Add SkipOnHelixCondition attribute and fix test infrastructure Skip two failing tests and add SkipOnHelixCondition attribute May 1, 2026
@AndriySvyryd AndriySvyryd requested a review from Copilot May 1, 2026 04:59
@AndriySvyryd AndriySvyryd marked this pull request as ready for review May 1, 2026 04:59
@AndriySvyryd AndriySvyryd requested a review from a team as a code owner May 1, 2026 04:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (an ITestCondition) to skip tests when running under Helix (HELIX_WORKITEM_ROOT is set).
  • Replaces ad-hoc Helix environment-variable early-return logic across SQL Server type tests with [SkipOnHelixCondition].
  • Updates dotnet-ef.Tests to 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”.

Comment thread test/dotnet-ef.Tests/ProjectTest.cs
Comment thread test/dotnet-ef.Tests/ProjectTest.cs
@AndriySvyryd AndriySvyryd merged commit bc02e61 into main May 1, 2026
36 of 37 checks passed
@AndriySvyryd AndriySvyryd deleted the andriysvyryd/fix-csproj-metadata-test branch May 1, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants