Skip to content
Merged
Show file tree
Hide file tree
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
Expand Up @@ -42,6 +42,7 @@ public override async Task Date()
AssertSql();
}

[CosmosCondition(CosmosCondition.IsEmulator)]
public override async Task Year()
{
// Our persisted representation of DateTimeOffset (xxx+00:00) isn't supported by Cosmos (should be xxxZ). #35310
Expand All @@ -55,6 +56,7 @@ FROM root c
""");
}

[CosmosCondition(CosmosCondition.IsEmulator)]
public override async Task Month()
{
// Our persisted representation of DateTimeOffset (xxx+00:00) isn't supported by Cosmos (should be xxxZ). #35310
Expand All @@ -76,6 +78,7 @@ public override async Task DayOfYear()
AssertSql();
}

[CosmosCondition(CosmosCondition.IsEmulator)]
public override async Task Day()
{
// Our persisted representation of DateTimeOffset (xxx+00:00) isn't supported by Cosmos (should be xxxZ). #35310
Expand All @@ -89,6 +92,7 @@ FROM root c
""");
}

[CosmosCondition(CosmosCondition.IsEmulator)]
public override async Task Hour()
{
// Our persisted representation of DateTimeOffset (xxx+00:00) isn't supported by Cosmos (should be xxxZ). #35310
Expand All @@ -102,6 +106,7 @@ FROM root c
""");
}

[CosmosCondition(CosmosCondition.IsEmulator)]
public override async Task Minute()
{
// Our persisted representation of DateTimeOffset (xxx+00:00) isn't supported by Cosmos (should be xxxZ). #35310
Expand All @@ -115,6 +120,7 @@ FROM root c
""");
}

[CosmosCondition(CosmosCondition.IsEmulator)]
public override async Task Second()
{
// Our persisted representation of DateTimeOffset (xxx+00:00) isn't supported by Cosmos (should be xxxZ). #35310
Expand All @@ -128,6 +134,7 @@ FROM root c
""");
}

[CosmosCondition(CosmosCondition.IsEmulator)]
public override async Task Millisecond()
{
// Our persisted representation of DateTimeOffset (xxx+00:00) isn't supported by Cosmos (should be xxxZ). #35310
Expand All @@ -141,6 +148,7 @@ FROM root c
""");
}

[CosmosCondition(CosmosCondition.IsEmulator)]
public override async Task Microsecond()
{
// Our persisted representation of DateTimeOffset (xxx+00:00) isn't supported by Cosmos (should be xxxZ). #35310
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public virtual async Task AutoTransactionBehaviorNever_DoesNotThrow()
using var context = fixture.CreateContext();
context.Database.AutoTransactionBehavior = AutoTransactionBehavior.Never;

context.AddRange(Enumerable.Range(0, 200).Select(x => new Customer()));
context.AddRange(Enumerable.Range(0, 100).Select(x => new Customer()));
await context.SaveChangesAsync();
}

Expand All @@ -27,7 +27,7 @@ public virtual async Task AutoTransactionBehaviorWhenNeeded_Throws()

context.AddRange(Enumerable.Range(0, 200).Select(x => new Customer()));
var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.SaveChangesAsync());
Assert.Equal(Message, ex.Message);
Assert.Equal(BulkExecutionWithTransactionalBatchMessage, ex.Message);
}

[ConditionalFact]
Expand All @@ -38,10 +38,10 @@ public virtual async Task AutoTransactionBehaviorAlways_Throws()

context.AddRange(Enumerable.Range(0, 200).Select(x => new Customer()));
var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.SaveChangesAsync());
Assert.Equal(Message, ex.Message);
Assert.Equal(BulkExecutionWithTransactionalBatchMessage, ex.Message);
}

private string Message => CoreStrings.WarningAsErrorTemplate(
private string BulkExecutionWithTransactionalBatchMessage => CoreStrings.WarningAsErrorTemplate(
CosmosEventId.BulkExecutionWithTransactionalBatch.ToString(),
CosmosResources.LogBulkExecutionWithTransactionalBatch(new TestLogger<CosmosLoggingDefinitions>()).GenerateMessage(),
"CosmosEventId.BulkExecutionWithTransactionalBatch");
Expand Down
Loading