Skip to content

Commit 0259fad

Browse files
committed
Also skip Save_changed_optional_one_to_one_with_alternate_key_in_store
1 parent 45a5cfd commit 0259fad

5 files changed

Lines changed: 24 additions & 15 deletions

File tree

azure-pipelines-internal-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ extends:
137137
Test__Cosmos__DefaultConnection: $(_CosmosConnectionUrl)
138138
Test__SqlServer__DefaultConnection: "Data Source="
139139
displayName: Build
140-
- script: .dotnet\dotnet test test\EFCore.ApiBaseline.Tests -configuration $(_BuildConfig)
140+
- script: .dotnet\dotnet test test\EFCore.ApiBaseline.Tests -p:Configuration=$(_BuildConfig)
141141
displayName: Test API Baselines
142142
condition: succeeded()
143143
- powershell: |

azure-pipelines-public.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ stages:
8181
Test__Cosmos__DefaultConnection: $(_CosmosConnectionUrl)
8282
Test__SqlServer__DefaultConnection: "Data Source="
8383
name: Build
84-
- script: .dotnet\dotnet test test\EFCore.ApiBaseline.Tests -configuration $(_BuildConfig)
84+
- script: .dotnet\dotnet test test\EFCore.ApiBaseline.Tests -p:Configuration=$(_BuildConfig)
8585
displayName: Test API Baselines
8686
condition: succeeded()
8787
- powershell: |

test/EFCore.InMemory.FunctionalTests/GraphUpdates/ProxyGraphUpdatesInMemoryTest.cs

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ public abstract class ProxyGraphUpdatesInMemoryTestBase<TFixture>(TFixture fixtu
1010
where TFixture : ProxyGraphUpdatesInMemoryTestBase<TFixture>.ProxyGraphUpdatesInMemoryFixtureBase, new()
1111
{
1212
// FK constraint checking.
13-
[Fact]
1413
public override Task Optional_one_to_one_relationships_are_one_to_one()
1514
=> Assert.ThrowsAnyAsync<Exception>(() => base.Optional_one_to_one_relationships_are_one_to_one());
1615

1716
// FK constraint checking.
18-
[Fact]
1917
public override Task Optional_one_to_one_with_AK_relationships_are_one_to_one()
2018
=> Assert.ThrowsAnyAsync<Exception>(() => base.Optional_one_to_one_with_AK_relationships_are_one_to_one());
2119

@@ -100,12 +98,10 @@ public override Task Required_many_to_one_dependents_with_alternate_key_are_casc
10098
=> Task.CompletedTask;
10199

102100
// FK constraint checking.
103-
[Fact]
104101
public override Task Required_one_to_one_relationships_are_one_to_one()
105102
=> Assert.ThrowsAnyAsync<Exception>(() => base.Required_one_to_one_relationships_are_one_to_one());
106103

107104
// FK constraint checking.
108-
[Fact]
109105
public override Task Required_one_to_one_with_AK_relationships_are_one_to_one()
110106
=> Assert.ThrowsAnyAsync<Exception>(() => base.Required_one_to_one_with_AK_relationships_are_one_to_one());
111107

@@ -121,7 +117,7 @@ public override Task Required_many_to_one_dependents_with_alternate_key_are_casc
121117
public override Task Can_attach_full_optional_graph_of_duplicates()
122118
=> Task.CompletedTask;
123119

124-
// Cascade delete.
120+
// Graph fixup ordering is non-deterministic on InMemory.
125121
public override Task Can_attach_full_required_AK_graph_of_duplicates()
126122
=> Task.CompletedTask;
127123

@@ -141,6 +137,10 @@ public override Task Reparent_required_non_PK_one_to_one_with_alternate_key(
141137
bool useExistingRoot)
142138
=> Task.CompletedTask;
143139

140+
// Cascade delete.
141+
public override Task Save_changed_optional_one_to_one_with_alternate_key_in_store()
142+
=> Task.CompletedTask;
143+
144144
// Cascade delete.
145145
public override Task Sever_required_one_to_one(ChangeMechanism changeMechanism)
146146
=> Task.CompletedTask;
@@ -171,10 +171,17 @@ protected override async Task ExecuteWithStrategyInTransactionAsync(
171171
Func<DbContext, Task> nestedTestOperation2 = null,
172172
Func<DbContext, Task> nestedTestOperation3 = null)
173173
{
174-
await base.ExecuteWithStrategyInTransactionAsync(
175-
testOperation, nestedTestOperation1, nestedTestOperation2, nestedTestOperation3);
176-
177-
await Fixture.ReseedAsync();
174+
// InMemory has no real transactions, so the shared store is mutated directly by each test and must be
175+
// reseeded afterwards.
176+
try
177+
{
178+
await base.ExecuteWithStrategyInTransactionAsync(
179+
testOperation, nestedTestOperation1, nestedTestOperation2, nestedTestOperation3);
180+
}
181+
finally
182+
{
183+
await Fixture.ReseedAsync();
184+
}
178185
}
179186

180187
public abstract class ProxyGraphUpdatesInMemoryFixtureBase : ProxyGraphUpdatesFixtureBase

test/EFCore.Specification.Tests/Query/NorthwindAggregateOperatorsQueryTestBase.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,16 @@ public virtual Task Average_over_nested_subquery(bool async)
249249
=> AssertAverage(
250250
async,
251251
ss => ss.Set<Customer>().OrderBy(c => c.CustomerID).Take(3),
252-
selector: c => (decimal)c.Orders.Average(double (o) => 5 + o.OrderDetails.Average(int (od) => od.ProductID)));
252+
selector: c => (decimal)c.Orders.Average(double (o) => 5 + o.OrderDetails.Average(int (od) => od.ProductID)),
253+
asserter: (e, a) => Assert.Equal(e, a, 10));
253254

254255
[Theory, MemberData(nameof(IsAsyncData))]
255256
public virtual Task Average_over_max_subquery(bool async)
256257
=> AssertAverage(
257258
async,
258259
ss => ss.Set<Customer>().OrderBy(c => c.CustomerID).Take(3),
259-
selector: c => (decimal)c.Orders.Average(int (o) => 5 + o.OrderDetails.Max(int (od) => od.ProductID)));
260+
selector: c => (decimal)c.Orders.Average(int (o) => 5 + o.OrderDetails.Max(int (od) => od.ProductID)),
261+
asserter: (e, a) => Assert.Equal(e, a, 10));
260262

261263
[Theory, MemberData(nameof(IsAsyncData))]
262264
public virtual Task Average_on_float_column(bool async)

test/EFCore.SqlServer.FunctionalTests/BuiltInDataTypesSqlServerTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3859,8 +3859,8 @@ public async Task Xml_value_round_trips(string value, string expected)
38593859
SELECT COALESCE([x].[Content], @value)
38603860
FROM [XmlTestDocument] AS [x]
38613861
WHERE [x].[Id] = @id
3862-
""",
3863-
query.ToQueryString());
3862+
""".ReplaceLineEndings(),
3863+
query.ToQueryString().ReplaceLineEndings());
38643864

38653865
var roundTripped = await query.SingleAsync();
38663866
Assert.Equal(expected, roundTripped);

0 commit comments

Comments
 (0)