Skip to content

Commit 3ddc83c

Browse files
rojiShay RojanskyCopilot
authored
Sync to EF 11.0.0-preview.5.26275.101
* Sync to EF 11.0.0-preview.5.26275.101 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix EF sync test fallout Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Use MTP-compatible test command in CI Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update TPC inheritance insert test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Shay Rojansky <roji@mars.local> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9548832 commit 3ddc83c

41 files changed

Lines changed: 118 additions & 106 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
shell: bash
113113

114114
- name: Test
115-
run: dotnet test -c ${{ matrix.config }} --logger "GitHubActions;report-warnings=false"
115+
run: dotnet test -c ${{ matrix.config }} -- --no-progress
116116
shell: bash
117117
env:
118118
# Disable SSL to avoid unnecessary handshake pressure in the Windows functional tests.

Directory.Packages.props

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project>
22
<PropertyGroup>
3-
<EFCoreVersion>11.0.0-preview.5.26267.102</EFCoreVersion>
4-
<MicrosoftExtensionsVersion>11.0.0-preview.5.26267.102</MicrosoftExtensionsVersion>
5-
<MicrosoftExtensionsConfigurationVersion>11.0.0-preview.5.26267.102</MicrosoftExtensionsConfigurationVersion>
3+
<EFCoreVersion>11.0.0-preview.5.26275.101</EFCoreVersion>
4+
<MicrosoftExtensionsVersion>11.0.0-preview.5.26275.101</MicrosoftExtensionsVersion>
5+
<MicrosoftExtensionsConfigurationVersion>11.0.0-preview.5.26275.101</MicrosoftExtensionsConfigurationVersion>
66
<NpgsqlVersion>10.0.0</NpgsqlVersion>
77
</PropertyGroup>
88

@@ -28,6 +28,7 @@
2828

2929
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
3030
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
31+
<PackageVersion Include="xunit.v3" Version="4.0.0-pre.108" />
3132
<PackageVersion Include="xunit" Version="2.9.3" />
3233
<PackageVersion Include="xunit.assert" Version="2.9.3" />
3334
<PackageVersion Include="xunit.core" Version="2.9.3" />

NuGet.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
<packageSource key="dotnet11">
2222
<package pattern="*" />
2323
</packageSource>
24+
<packageSource key="dotnet-eng">
25+
<package pattern="Microsoft.DotNet.*" />
26+
</packageSource>
2427
</packageSourceMapping>
2528

2629
</configuration>

global.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
"version": "11.0.100-preview.4.26210.111",
44
"rollForward": "latestMinor",
55
"allowPrerelease": true
6+
},
7+
"test": {
8+
"runner": "Microsoft.Testing.Platform"
69
}
710
}

src/EFCore.PG/Query/ExpressionTranslators/Internal/NpgsqlMathTranslator.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public class NpgsqlMathTranslator(
1818
IModel model) : IMethodCallTranslator
1919
{
2020
private readonly RelationalTypeMapping _intTypeMapping = typeMappingSource.FindMapping(typeof(int), model)!;
21+
private readonly RelationalTypeMapping _doubleTypeMapping = typeMappingSource.FindMapping(typeof(double), model)!;
2122
private readonly RelationalTypeMapping _decimalTypeMapping = typeMappingSource.FindMapping(typeof(decimal), model)!;
2223

2324
/// <inheritdoc />
@@ -226,7 +227,8 @@ SqlExpression TranslateSign(SqlExpression argument)
226227
[argument],
227228
nullable: true,
228229
argumentsPropagateNullability: TrueArrays[1],
229-
method.ReturnType),
230+
argument.Type == typeof(decimal) ? typeof(decimal) : typeof(double),
231+
argument.Type == typeof(decimal) ? argument.TypeMapping : _doubleTypeMapping),
230232
typeof(int),
231233
_intTypeMapping);
232234
}

test/Directory.Build.props

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,21 @@
55
<PropertyGroup>
66
<IsPackable>false</IsPackable>
77
<GenerateDocumentationFile>false</GenerateDocumentationFile>
8+
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
89

910
<!-- There's lots of use of internal EF Core APIs from the tests, suppress the analyzer warnings for those -->
10-
<NoWarn>$(NoWarn);xUnit1003;xUnit1004;xUnit1013;xUnit1024;EF1001</NoWarn>
11+
<NoWarn>$(NoWarn);CS0618;xUnit1003;xUnit1004;xUnit1008;xUnit1013;xUnit1024;xUnit1051;EF1001</NoWarn>
12+
</PropertyGroup>
13+
14+
<PropertyGroup>
15+
<OutputType>Exe</OutputType>
16+
<TestRunnerName>XUnitV3</TestRunnerName>
17+
<TestingPlatformCommandLineArguments>$(TestingPlatformCommandLineArguments) --filter-not-trait category=failing --ignore-exit-code 8</TestingPlatformCommandLineArguments>
1118
</PropertyGroup>
1219

1320
<ItemGroup>
1421
<PackageReference Include="Microsoft.NET.Test.Sdk" />
15-
<PackageReference Include="xunit" />
22+
<PackageReference Include="xunit.v3" />
1623
<PackageReference Include="xunit.runner.visualstudio" />
1724
<PackageReference Include="GitHubActionsTestLogger" />
1825
<PackageReference Include="Npgsql" />
@@ -24,7 +31,6 @@
2431

2532
<ItemGroup>
2633
<Using Include="Xunit" />
27-
<Using Include="Xunit.Abstractions" />
2834
<Using Include="Microsoft.EntityFrameworkCore.TestUtilities" />
2935
<Using Include="Microsoft.EntityFrameworkCore.TestUtilities.Xunit" />
3036
</ItemGroup>

test/EFCore.PG.FunctionalTests/BuiltInDataTypesNpgsqlTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.Collections.Immutable;
1+
using System.Collections.Immutable;
22
using System.ComponentModel.DataAnnotations.Schema;
33
using System.Net.NetworkInformation;
44

@@ -719,7 +719,7 @@ private static void AssertNullMappedNullableDataTypes(MappedNullableDataTypes en
719719
Assert.Null(entity.Mood);
720720
}
721721

722-
[ConditionalFact(Skip = "DateTimeOffset with non-zero offset, https://github.com/dotnet/efcore/issues/26068")]
722+
[ActiveIssue("DateTimeOffset with non-zero offset, https://github.com/dotnet/efcore/issues/26068")]
723723
public override Task Can_insert_and_read_back_object_backed_data_types()
724724
=> Task.CompletedTask;
725725

test/EFCore.PG.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesNpgsqlTest.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,6 @@ WHERE c."CustomerID" LIKE 'F%'
14071407
""");
14081408
}
14091409

1410-
[ConditionalTheory]
14111410
public override async Task Update_with_cross_join_left_join_set_constant(bool async)
14121411
{
14131412
await base.Update_with_cross_join_left_join_set_constant(async);
@@ -1437,7 +1436,6 @@ WHERE c."CustomerID" LIKE 'F%'
14371436
""");
14381437
}
14391438

1440-
[ConditionalTheory]
14411439
public override async Task Update_with_cross_join_cross_apply_set_constant(bool async)
14421440
{
14431441
await base.Update_with_cross_join_cross_apply_set_constant(async);
@@ -1467,7 +1465,6 @@ WHERE c."CustomerID" LIKE 'F%'
14671465
""");
14681466
}
14691467

1470-
[ConditionalTheory]
14711468
public override async Task Update_with_cross_join_outer_apply_set_constant(bool async)
14721469
{
14731470
await base.Update_with_cross_join_outer_apply_set_constant(async);
@@ -1577,7 +1574,6 @@ WHERE c."CustomerID" LIKE 'F%'
15771574
""");
15781575
}
15791576

1580-
[ConditionalTheory]
15811577
[MemberData(nameof(IsAsyncData))]
15821578
public override async Task Update_with_two_inner_joins(bool async)
15831579
{

test/EFCore.PG.FunctionalTests/ComputedColumnTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ public void Can_use_computed_columns_with_nullable_enum()
134134

135135
protected NpgsqlTestStore TestStore { get; private set; } = null!;
136136

137-
public async Task InitializeAsync()
137+
public async ValueTask InitializeAsync()
138138
=> TestStore = await NpgsqlTestStore.CreateInitializedAsync("ComputedColumnTest");
139139

140-
public async Task DisposeAsync()
140+
public async ValueTask DisposeAsync()
141141
=> await TestStore.DisposeAsync();
142142
}

test/EFCore.PG.FunctionalTests/ConnectionInterceptionNpgsqlTest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ namespace Microsoft.EntityFrameworkCore;
77
public abstract class ConnectionInterceptionNpgsqlTestBase(ConnectionInterceptionNpgsqlTestBase.InterceptionNpgsqlFixtureBase fixture)
88
: ConnectionInterceptionTestBase(fixture)
99
{
10-
[ConditionalTheory(Skip = "#2368")]
10+
[ActiveIssue("#2368")]
1111
public override Task Intercept_connection_creation_passively(bool async)
1212
=> base.Intercept_connection_creation_passively(async);
1313

14-
[ConditionalTheory(Skip = "#2368")]
14+
[ActiveIssue("#2368")]
1515
public override Task Intercept_connection_creation_with_multiple_interceptors(bool async)
1616
=> base.Intercept_connection_creation_with_multiple_interceptors(async);
1717

18-
[ConditionalTheory(Skip = "#2368")]
18+
[ActiveIssue("#2368")]
1919
public override Task Intercept_connection_to_override_connection_after_creation(bool async)
2020
=> base.Intercept_connection_to_override_connection_after_creation(async);
2121

22-
[ConditionalTheory(Skip = "#2368")]
22+
[ActiveIssue("#2368")]
2323
public override Task Intercept_connection_to_override_creation(bool async)
2424
=> base.Intercept_connection_to_override_creation(async);
2525

0 commit comments

Comments
 (0)