Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.BulkUpdates;
using Microsoft.EntityFrameworkCore.TestModels.Northwind;
using Microsoft.EntityFrameworkCore.TestUtilities;
Expand Down Expand Up @@ -1475,6 +1476,28 @@
""");
}

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual Task Update_Where_set_ordering_is_preserved(bool async)
=> TestHelpers.ExecuteWithStrategyInTransactionAsync(
Fixture.CreateContext, Fixture.UseTransaction,
async context =>
{
var updated = await context.Set<Customer>().ExecuteUpdateAsync(
setters => setters
.SetProperty(c => c.ContactName, "X")
.SetProperty(c => c.ContactTitle, c => c.ContactName + "Y"));
Assert.True(updated > 0);
Assert.Equal(updated, await context.Set<Customer>().CountAsync(c => c.ContactTitle == "XY"));

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (10.11.10-mariadb, ubuntu-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: True)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (10.11.10-mariadb, ubuntu-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: False)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (10.6.20-mariadb, ubuntu-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: True)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (10.6.20-mariadb, ubuntu-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: False)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (11.6.2-mariadb, ubuntu-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: True)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (11.6.2-mariadb, ubuntu-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: False)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (11.4.4-mariadb, ubuntu-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: True)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (11.4.4-mariadb, ubuntu-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: False)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (11.3.2-mariadb, ubuntu-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: True)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (11.3.2-mariadb, ubuntu-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: False)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (11.5.2-mariadb, ubuntu-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: True)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (11.5.2-mariadb, ubuntu-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: False)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (10.5.27-mariadb, ubuntu-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: True)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (10.5.27-mariadb, ubuntu-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: False)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (8.4.3-mysql, ubuntu-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: True)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (8.4.3-mysql, ubuntu-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: False)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (8.0.40-mysql, ubuntu-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: True)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (8.0.40-mysql, ubuntu-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: False)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (10.6.20-mariadb, windows-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: True)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (10.6.20-mariadb, windows-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: False)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (10.11.10-mariadb, windows-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: True)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (10.11.10-mariadb, windows-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: False)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (11.4.4-mariadb, windows-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: True)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (11.4.4-mariadb, windows-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: False)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (11.6.2-mariadb, windows-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: True)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (11.6.2-mariadb, windows-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: False)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (10.5.27-mariadb, windows-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: True)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (10.5.27-mariadb, windows-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: False)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (8.4.3-mysql, windows-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: True)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (8.4.3-mysql, windows-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: False)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (11.5.2-mariadb, windows-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: True)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (11.5.2-mariadb, windows-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: False)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (8.0.40-mysql, windows-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: True)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (8.0.40-mysql, windows-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: False)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (11.3.2-mariadb, windows-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: True)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

Check failure on line 1491 in test/EFCore.MySql.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesMySqlTest.cs

View workflow job for this annotation

GitHub Actions / BuildAndTest (11.3.2-mariadb, windows-latest)

Pomelo.EntityFrameworkCore.MySql.FunctionalTests.BulkUpdates.NorthwindBulkUpdatesMySqlTest.Update_Where_set_ordering_is_preserved(async: False)

Assert.Equal() Failure: Values differ Expected: 91 Actual: 0

updated = await context.Set<Customer>().ExecuteUpdateAsync(
setters => setters
.SetProperty(c => c.City, "Y")
.SetProperty(c => c.ContactName, c => c.City + "X"));
Assert.True(updated > 0);
Assert.Equal(updated, await context.Set<Customer>().CountAsync(c => c.ContactName == "YX"));
});

private void AssertSql(params string[] expected)
=> Fixture.TestSqlLoggerFactory.AssertBaseline(expected);

Expand Down
Loading