diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index bdf071cb200..c88619e7bea 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -40,7 +40,7 @@ jobs: --health-timeout=5s cosmosdb: - image: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-preview + image: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-latest ports: - 8081:8081 env: diff --git a/test/EFCore.Cosmos.FunctionalTests/CosmosSessionTokensTest.cs b/test/EFCore.Cosmos.FunctionalTests/CosmosSessionTokensTest.cs index 1ee1f1098d1..2d7c90d3cbf 100644 --- a/test/EFCore.Cosmos.FunctionalTests/CosmosSessionTokensTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/CosmosSessionTokensTest.cs @@ -578,7 +578,6 @@ protected Test2Context() } } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/291 (Session tokens not properly tracked) public class CosmosNonSharedSessionTokenTests(NonSharedFixture fixture) : NonSharedModelTestBase(fixture), IClassFixture { protected override ITestStoreFactory NonSharedTestStoreFactory @@ -588,8 +587,7 @@ protected override ITestStoreFactory NonSharedTestStoreFactory protected override TestStore CreateTestStore() => CosmosTestStore.Create(NonSharedStoreName, (cfg) => cfg.SessionTokenManagementMode(Cosmos.Infrastructure.SessionTokenManagementMode.SemiAutomatic)); - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/322 - [ConditionalFact(typeof(CosmosTestEnvironment), nameof(CosmosTestEnvironment.IsNotLinuxEmulator))] + [Fact] public virtual async Task UseSessionTokens_uses_session_tokens() { var contextFactory = await InitializeNonSharedTest(); @@ -633,8 +631,7 @@ public virtual async Task ReadItem_does_not_exist_returns_null() Assert.Null(result); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/322 - [ConditionalFact(typeof(CosmosTestEnvironment), nameof(CosmosTestEnvironment.IsNotLinuxEmulator))] + [Fact] public virtual async Task Read_item_session_not_found_throws_CosmosException() { var contextFactory = await InitializeNonSharedTest(); @@ -721,7 +718,7 @@ public virtual async Task Pooled_context_clears_SessionTokenStorage() Assert.True(_sessionTokenStorage.ClearCalled); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/319 + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/331 [ConditionalTheory(typeof(CosmosTestEnvironment), nameof(CosmosTestEnvironment.IsNotLinuxEmulator))] [InlineData(AutoTransactionBehavior.Never)] [InlineData(AutoTransactionBehavior.Always)] diff --git a/test/EFCore.Cosmos.FunctionalTests/CosmosTransactionalBatchTest.cs b/test/EFCore.Cosmos.FunctionalTests/CosmosTransactionalBatchTest.cs index 73ec2220771..b5ea6676608 100644 --- a/test/EFCore.Cosmos.FunctionalTests/CosmosTransactionalBatchTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/CosmosTransactionalBatchTest.cs @@ -14,8 +14,7 @@ public class CosmosTransactionalBatchTest(CosmosTransactionalBatchTest.CosmosFix protected CosmosFixture Fixture { get; } = fixture; - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/292 (Transactional batch limits not enforced) - [ConditionalFact(typeof(CosmosTestEnvironment), nameof(CosmosTestEnvironment.IsNotLinuxEmulator))] + [Fact] public virtual async Task SaveChanges_fails_for_duplicate_key_in_same_partition_prevents_other_inserts_in_same_partition_even_if_staged_before_add() { using (var arrangeContext = Fixture.CreateContext()) @@ -107,8 +106,7 @@ public virtual async Task SaveChanges_transaction_behavior_never_fails_for_dupli Assert.Equal(4, customersCount); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/292 (Transactional batch limits not enforced) - [ConditionalFact(typeof(CosmosTestEnvironment), nameof(CosmosTestEnvironment.IsNotLinuxEmulator))] + [Fact] public virtual async Task SaveChanges_transaction_behavior_always_fails_for_multiple_partitionkeys() { using var context = Fixture.CreateContext(); @@ -171,8 +169,7 @@ public virtual async Task SaveChanges_transaction_behavior_always_succeeds_for_1 Assert.Equal(100, customersCount); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/292 (Transactional batch limits not enforced) - [ConditionalFact(typeof(CosmosTestEnvironment), nameof(CosmosTestEnvironment.IsNotLinuxEmulator))] + [Fact] public virtual async Task SaveChanges_transaction_behavior_always_fails_for_multiple_entities_with_triggers() { using var context = Fixture.CreateContext(); @@ -189,7 +186,7 @@ public virtual async Task SaveChanges_transaction_behavior_always_fails_for_mult Assert.Equal(0, customersCount); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/294 + // Triggers are not supported in the Linux emulator [ConditionalFact(typeof(CosmosTestEnvironment), nameof(CosmosTestEnvironment.IsNotLinuxEmulator))] public virtual async Task SaveChanges_transaction_behavior_always_succeeds_for_single_entity_with_trigger() { @@ -233,8 +230,7 @@ public virtual async Task SaveChanges_transaction_behavior_always_succeeds_for_s Assert.Equal(1, customersCount); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/292 (Transactional batch limits not enforced) - [ConditionalFact(typeof(CosmosTestEnvironment), nameof(CosmosTestEnvironment.IsNotLinuxEmulator))] + [Fact] public virtual async Task SaveChanges_transaction_behavior_always_fails_for_single_entity_with_trigger_and_entity_without_trigger() { using var context = Fixture.CreateContext(); @@ -284,7 +280,6 @@ public virtual async Task SaveChanges_entity_too_large_throws() Assert.Equal(0, customersCount); } - [Fact] public virtual async Task SaveChanges_too_large_entry_after_smaller_throws_after_saving_smaller() { @@ -366,7 +361,7 @@ public virtual async Task SaveChanges_exactly_2_mib_does_not_split_and_one_byte_ private const int MaxSpecialCharsInId = MaxKeySize / 3; // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/323 - [ConditionalTheory(typeof(CosmosTestEnvironment), nameof(CosmosTestEnvironment.IsNotLinuxEmulator)), InlineData(true), InlineData(false)] + [Theory, InlineData(true), InlineData(false)] public virtual async Task SaveChanges_update_id_contains_special_chars_which_makes_request_larger_than_2_mib_splits_into_2_batches(bool isIdSpecialChar) { using var context = Fixture.CreateContext(); diff --git a/test/EFCore.Cosmos.FunctionalTests/EndToEndCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/EndToEndCosmosTest.cs index e240c8a77bb..879677243e8 100644 --- a/test/EFCore.Cosmos.FunctionalTests/EndToEndCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/EndToEndCosmosTest.cs @@ -14,9 +14,7 @@ namespace Microsoft.EntityFrameworkCore; public class EndToEndCosmosTest(NonSharedFixture fixture) : NonSharedModelTestBase(fixture), IClassFixture { - - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/292 (Transactional batch limits not enforced) - [ConditionalTheory(typeof(CosmosTestEnvironment), nameof(CosmosTestEnvironment.IsNotLinuxEmulator))] + [Theory] [InlineData(false)] [InlineData(true)] public async Task Can_add_update_delete_end_to_end(bool transactionalBatch) diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/Associations/ComplexProperties/ComplexPropertiesCollectionCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/Associations/ComplexProperties/ComplexPropertiesCollectionCosmosTest.cs index ffdfb12d2f9..d78c688092b 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/Associations/ComplexProperties/ComplexPropertiesCollectionCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/Associations/ComplexProperties/ComplexPropertiesCollectionCosmosTest.cs @@ -26,7 +26,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Where() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -197,7 +197,7 @@ public override Task GroupBy() #endregion GroupBy - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Select_within_Select_within_Select_with_aggregates() { CosmosTestEnvironment.SkipOnLinuxEmulator(); diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/Associations/ComplexProperties/ComplexPropertiesPrimitiveCollectionCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/Associations/ComplexProperties/ComplexPropertiesPrimitiveCollectionCosmosTest.cs index 050d1473276..866196971bd 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/Associations/ComplexProperties/ComplexPropertiesPrimitiveCollectionCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/Associations/ComplexProperties/ComplexPropertiesPrimitiveCollectionCosmosTest.cs @@ -72,7 +72,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Select_Sum() { CosmosTestEnvironment.SkipOnLinuxEmulator(); diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionCosmosTest.cs index 8a0a11d8fa2..d658353c60d 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsCollectionCosmosTest.cs @@ -39,7 +39,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Where() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -164,7 +164,7 @@ public override Task GroupBy() #endregion GroupBy - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Select_within_Select_within_Select_with_aggregates() { CosmosTestEnvironment.SkipOnLinuxEmulator(); diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsPrimitiveCollectionCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsPrimitiveCollectionCosmosTest.cs index bae7ca0101a..8582ec4eb47 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsPrimitiveCollectionCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/Associations/OwnedNavigations/OwnedNavigationsPrimitiveCollectionCosmosTest.cs @@ -72,7 +72,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Select_Sum() { CosmosTestEnvironment.SkipOnLinuxEmulator(); diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/OwnedQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/OwnedQueryCosmosTest.cs index 814137a29ee..91ea61bb86e 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/OwnedQueryCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/OwnedQueryCosmosTest.cs @@ -817,7 +817,7 @@ public override Task Indexer_property_is_pushdown_into_subquery(bool async) () => base.Indexer_property_is_pushdown_into_subquery(async), CosmosStrings.NonCorrelatedSubqueriesNotSupported); - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override Task Can_query_indexer_property_on_owned_collection(bool async) => CosmosTestHelpers.Instance.NoSyncTest( async, async a => diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/PrimitiveCollectionsQueryCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/PrimitiveCollectionsQueryCosmosTest.cs index c5cf1ec5edc..47b3aa545ce 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/PrimitiveCollectionsQueryCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/PrimitiveCollectionsQueryCosmosTest.cs @@ -55,7 +55,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Inline_collection_Count_with_zero_values() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -73,7 +73,7 @@ FROM a IN (SELECT VALUE []) """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Inline_collection_Count_with_one_value() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -91,7 +91,7 @@ FROM a IN (SELECT VALUE [2]) """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Inline_collection_Count_with_two_values() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -109,7 +109,7 @@ FROM a IN (SELECT VALUE [2, 999]) """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Inline_collection_Count_with_three_values() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -251,7 +251,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Inline_collection_Min_with_two_values() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -268,7 +268,7 @@ FROM a IN (SELECT VALUE [30, c["Int"]])) = 30) """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Inline_collection_List_Min_with_two_values() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -285,7 +285,7 @@ FROM a IN (SELECT VALUE [30, c["Int"]])) = 30) """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Inline_collection_Max_with_two_values() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -302,7 +302,7 @@ FROM a IN (SELECT VALUE [30, c["Int"]])) = 30) """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Inline_collection_List_Max_with_two_values() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -319,7 +319,7 @@ FROM a IN (SELECT VALUE [30, c["Int"]])) = 30) """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Inline_collection_Min_with_three_values() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -338,7 +338,7 @@ FROM a IN (SELECT VALUE [30, c["Int"], @i])) = 25) """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Inline_collection_List_Min_with_three_values() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -357,7 +357,7 @@ FROM a IN (SELECT VALUE [30, c["Int"], @i])) = 25) """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Inline_collection_Max_with_three_values() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -376,7 +376,7 @@ FROM a IN (SELECT VALUE [30, c["Int"], @i])) = 35) """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Inline_collection_List_Max_with_three_values() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -395,7 +395,7 @@ FROM a IN (SELECT VALUE [30, c["Int"], @i])) = 35) """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Inline_collection_of_nullable_value_type_Min() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -414,7 +414,7 @@ FROM a IN (SELECT VALUE [30, c["Int"], @i])) = 25) """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Inline_collection_of_nullable_value_type_Max() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -452,7 +452,7 @@ FROM a IN (SELECT VALUE [30, c["NullableInt"], @i])) = 30) """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Inline_collection_of_nullable_value_type_with_null_Max() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -481,7 +481,7 @@ public override async Task Inline_collection_with_single_parameter_element_Conta """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Inline_collection_with_single_parameter_element_Count() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -529,7 +529,7 @@ WHERE ARRAY_CONTAINS(@Select, c["NullableString"]) """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Inline_collection_Count_with_column_predicate_with_EF_Parameter() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -549,7 +549,7 @@ FROM p IN (SELECT VALUE @p) """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Inline_collection_in_query_filter() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -572,7 +572,7 @@ public override async Task Inline_collection_SelectMany_with_unreferenced_collec => await Assert.ThrowsAsync( () => base.Inline_collection_SelectMany_with_unreferenced_collection_value()); - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Parameter_collection_Count() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -1322,7 +1322,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Column_collection_Count_with_predicate() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -1340,7 +1340,7 @@ FROM i IN c["Ints"] """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Column_collection_Where_Count() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -2317,7 +2317,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Values_of_enum_casted_to_underlying_value() { CosmosTestEnvironment.SkipOnLinuxEmulator(); diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/ReadItemPartitionKeyQueryDiscriminatorInIdTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/ReadItemPartitionKeyQueryDiscriminatorInIdTest.cs index ea878932094..2d142ed1fe3 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/ReadItemPartitionKeyQueryDiscriminatorInIdTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/ReadItemPartitionKeyQueryDiscriminatorInIdTest.cs @@ -97,7 +97,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task Predicate_with_partial_values_in_hierarchical_partition_key() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -126,7 +126,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task Predicate_with_partial_values_in_only_hierarchical_partition_key() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -222,7 +222,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task WithPartitionKey_with_partial_value_in_hierarchical_partition_key() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -627,7 +627,7 @@ public override async Task Predicate_with_only_single_partition_key_leaf() AssertSql("""ReadItem(["PK1c"], DerivedOnlySinglePartitionKeyEntity|PK1c)"""); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task Predicate_with_partial_values_in_hierarchical_partition_key_leaf() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -643,7 +643,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task Predicate_with_partial_values_in_only_hierarchical_partition_key_leaf() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -739,7 +739,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task WithPartitionKey_with_partial_value_in_hierarchical_partition_key_leaf() { CosmosTestEnvironment.SkipOnLinuxEmulator(); diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/ReadItemPartitionKeyQueryNoDiscriminatorInIdTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/ReadItemPartitionKeyQueryNoDiscriminatorInIdTest.cs index 0a7af84e3d5..d8351308d83 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/ReadItemPartitionKeyQueryNoDiscriminatorInIdTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/ReadItemPartitionKeyQueryNoDiscriminatorInIdTest.cs @@ -94,7 +94,7 @@ public override async Task Predicate_with_only_single_partition_key() AssertSql("""ReadItem(["PK1a"], PK1a)"""); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task Predicate_with_partial_values_in_hierarchical_partition_key() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -123,7 +123,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task Predicate_with_partial_values_in_only_hierarchical_partition_key() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -217,7 +217,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task WithPartitionKey_with_partial_value_in_hierarchical_partition_key() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -505,7 +505,7 @@ public override async Task Predicate_with_only_single_partition_key_leaf() AssertSql("""ReadItem(["PK1c"], PK1c)"""); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task Predicate_with_partial_values_in_hierarchical_partition_key_leaf() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -521,7 +521,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task Predicate_with_partial_values_in_only_hierarchical_partition_key_leaf() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -615,7 +615,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task WithPartitionKey_with_partial_value_in_hierarchical_partition_key_leaf() { CosmosTestEnvironment.SkipOnLinuxEmulator(); diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/ReadItemPartitionKeyQueryRootDiscriminatorInIdTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/ReadItemPartitionKeyQueryRootDiscriminatorInIdTest.cs index 23a98ca0062..d2000eb7ce8 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/ReadItemPartitionKeyQueryRootDiscriminatorInIdTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/ReadItemPartitionKeyQueryRootDiscriminatorInIdTest.cs @@ -85,7 +85,7 @@ public override async Task Predicate_with_only_single_partition_key() AssertSql("""ReadItem(["PK1a"], OnlySinglePartitionKeyEntity|PK1a)"""); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task Predicate_with_partial_values_in_hierarchical_partition_key() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -114,7 +114,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task Predicate_with_partial_values_in_only_hierarchical_partition_key() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -210,7 +210,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task WithPartitionKey_with_partial_value_in_hierarchical_partition_key() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -498,7 +498,7 @@ public override async Task Predicate_with_only_single_partition_key_leaf() AssertSql("""ReadItem(["PK1c"], OnlySinglePartitionKeyEntity|PK1c)"""); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task Predicate_with_partial_values_in_hierarchical_partition_key_leaf() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -514,7 +514,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task Predicate_with_partial_values_in_only_hierarchical_partition_key_leaf() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -610,7 +610,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task WithPartitionKey_with_partial_value_in_hierarchical_partition_key_leaf() { CosmosTestEnvironment.SkipOnLinuxEmulator(); diff --git a/test/EFCore.Cosmos.FunctionalTests/Query/ReadItemPartitionKeyQueryTest.cs b/test/EFCore.Cosmos.FunctionalTests/Query/ReadItemPartitionKeyQueryTest.cs index 349b3046431..6be7c6327a1 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Query/ReadItemPartitionKeyQueryTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Query/ReadItemPartitionKeyQueryTest.cs @@ -87,7 +87,7 @@ public override async Task Predicate_with_only_single_partition_key() AssertSql("""ReadItem(["PK1a"], PK1a)"""); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task Predicate_with_partial_values_in_hierarchical_partition_key() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -117,7 +117,7 @@ FROM root c } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task Predicate_with_partial_values_in_only_hierarchical_partition_key() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -209,7 +209,7 @@ FROM root c """); } - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/290 (Partial hierarchical partition key queries return too many results) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/329 (Partial hierarchical partition key queries return too many results) public override async Task WithPartitionKey_with_partial_value_in_hierarchical_partition_key() { CosmosTestEnvironment.SkipOnLinuxEmulator(); diff --git a/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosTestEnvironment.cs b/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosTestEnvironment.cs index 60684b4cd83..283fc63462a 100644 --- a/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosTestEnvironment.cs +++ b/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosTestEnvironment.cs @@ -72,7 +72,7 @@ public static async Task InitializeAsync() CosmosDbContainer container; try { - container = new CosmosDbBuilder("mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-preview") + container = new CosmosDbBuilder("mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-latest") .Build(); await container.StartAsync().ConfigureAwait(false); } diff --git a/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosTestStore.cs b/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosTestStore.cs index ab74afbebbd..6a5057aa888 100644 --- a/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosTestStore.cs +++ b/test/EFCore.Cosmos.FunctionalTests/TestUtilities/CosmosTestStore.cs @@ -134,11 +134,6 @@ public override DbContextOptionsBuilder AddProviderOptions(DbContextOptionsBuild ? builder.UseCosmos(ConnectionUri, TokenCredential, Name, _configureCosmos) : builder.UseCosmos(ConnectionUri, AuthToken, Name, _configureCosmos); - if (CosmosTestEnvironment.IsLinuxEmulator) - { - result.AddInterceptors(LinuxEmulatorSaveChangesInterceptor.Instance); - } - return result; } diff --git a/test/EFCore.Cosmos.FunctionalTests/TestUtilities/LinuxEmulatorSaveChangesInterceptor.cs b/test/EFCore.Cosmos.FunctionalTests/TestUtilities/LinuxEmulatorSaveChangesInterceptor.cs deleted file mode 100644 index 668e93169c1..00000000000 --- a/test/EFCore.Cosmos.FunctionalTests/TestUtilities/LinuxEmulatorSaveChangesInterceptor.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using Microsoft.EntityFrameworkCore.Diagnostics; - -namespace Microsoft.EntityFrameworkCore.TestUtilities; - -/// -/// Interceptor that forces on every SaveChanges call. -/// The Linux (vnext) Cosmos emulator does not support transactional batches, so this interceptor -/// ensures all writes are sent individually rather than batched. -/// -public sealed class LinuxEmulatorSaveChangesInterceptor : SaveChangesInterceptor -{ - public static LinuxEmulatorSaveChangesInterceptor Instance { get; } = new(); - - public override InterceptionResult SavingChanges(DbContextEventData eventData, InterceptionResult result) - { - if (eventData.Context != null) - { - eventData.Context.Database.AutoTransactionBehavior = AutoTransactionBehavior.Never; - } - - return result; - } - - public override ValueTask> SavingChangesAsync( - DbContextEventData eventData, - InterceptionResult result, - CancellationToken cancellationToken = default) - { - if (eventData.Context != null) - { - eventData.Context.Database.AutoTransactionBehavior = AutoTransactionBehavior.Never; - } - - return ValueTask.FromResult(result); - } -} diff --git a/test/EFCore.Cosmos.FunctionalTests/Types/CosmosMiscellaneousTypeTest.cs b/test/EFCore.Cosmos.FunctionalTests/Types/CosmosMiscellaneousTypeTest.cs index d57bb1e07af..049ab48cbfa 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Types/CosmosMiscellaneousTypeTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Types/CosmosMiscellaneousTypeTest.cs @@ -6,7 +6,7 @@ namespace Microsoft.EntityFrameworkCore.Types.Miscellaneous; public class CosmosBoolTypeTest(CosmosBoolTypeTest.BoolTypeFixture fixture) : TypeTestBase(fixture) { - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Primitive_collection_in_query() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -27,7 +27,7 @@ public class BoolTypeFixture : CosmosTypeFixtureBase public class CosmosStringTypeTest(CosmosStringTypeTest.StringTypeFixture fixture) : TypeTestBase(fixture) { - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Primitive_collection_in_query() { CosmosTestEnvironment.SkipOnLinuxEmulator(); diff --git a/test/EFCore.Cosmos.FunctionalTests/Types/CosmosNumericTypeTest.cs b/test/EFCore.Cosmos.FunctionalTests/Types/CosmosNumericTypeTest.cs index a885107e20d..9b9dc42c99c 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Types/CosmosNumericTypeTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Types/CosmosNumericTypeTest.cs @@ -22,7 +22,7 @@ public class ByteTypeFixture : CosmosTypeFixtureBase public class CosmosShortTypeTest(CosmosShortTypeTest.ShortTypeFixture fixture) : TypeTestBase(fixture) { - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Primitive_collection_in_query() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -41,7 +41,7 @@ public class ShortTypeFixture : CosmosTypeFixtureBase public class CosmosIntTypeTest(CosmosIntTypeTest.IntTypeFixture fixture) : TypeTestBase(fixture) { - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Primitive_collection_in_query() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -61,7 +61,7 @@ public class IntTypeFixture : CosmosTypeFixtureBase public class CosmosLongTypeTest(CosmosLongTypeTest.LongTypeFixture fixture) : TypeTestBase(fixture) { - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Primitive_collection_in_query() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -81,7 +81,7 @@ public class LongTypeFixture : CosmosTypeFixtureBase public class CosmosDecimalTypeTest(CosmosDecimalTypeTest.DecimalTypeFixture fixture) : TypeTestBase(fixture) { - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Primitive_collection_in_query() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -101,7 +101,7 @@ public class DecimalTypeFixture : CosmosTypeFixtureBase public class CosmosDoubleTypeTest(CosmosDoubleTypeTest.DoubleTypeFixture fixture) : TypeTestBase(fixture) { - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Primitive_collection_in_query() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -121,7 +121,7 @@ public class DoubleTypeFixture : CosmosTypeFixtureBase public class CosmosFloatTypeTest(CosmosFloatTypeTest.FloatTypeFixture fixture) : TypeTestBase(fixture) { - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Primitive_collection_in_query() { CosmosTestEnvironment.SkipOnLinuxEmulator(); diff --git a/test/EFCore.Cosmos.FunctionalTests/Types/CosmosTemporalTypeTest.cs b/test/EFCore.Cosmos.FunctionalTests/Types/CosmosTemporalTypeTest.cs index a25cd663c12..6a3b3d3e1db 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Types/CosmosTemporalTypeTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Types/CosmosTemporalTypeTest.cs @@ -6,7 +6,7 @@ namespace Microsoft.EntityFrameworkCore.Types.Temporal; public class CosmosDateTimeTypeTest(CosmosDateTimeTypeTest.DateTimeTypeFixture fixture) : TypeTestBase(fixture) { - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Primitive_collection_in_query() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -26,7 +26,7 @@ public class DateTimeTypeFixture : CosmosTypeFixtureBase public class CosmosDateTimeOffsetTypeTest(CosmosDateTimeOffsetTypeTest.DateTimeOffsetTypeFixture fixture) : TypeTestBase(fixture) { - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Primitive_collection_in_query() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -45,7 +45,7 @@ public class DateTimeOffsetTypeFixture : CosmosTypeFixtureBase public class CosmosDateOnlyTypeTest(CosmosDateOnlyTypeTest.DateOnlyTypeFixture fixture) : TypeTestBase(fixture) { - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Primitive_collection_in_query() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -65,7 +65,7 @@ public class DateOnlyTypeFixture : CosmosTypeFixtureBase public class CosmosTimeOnlyTypeTest(CosmosTimeOnlyTypeTest.TimeOnlyTypeFixture fixture) : TypeTestBase(fixture) { - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Primitive_collection_in_query() { CosmosTestEnvironment.SkipOnLinuxEmulator(); @@ -84,7 +84,7 @@ public class TimeOnlyTypeFixture : CosmosTypeFixtureBase public class CosmosTimeSpanTypeTest(CosmosTimeSpanTypeTest.TimeSpanTypeFixture fixture) : TypeTestBase(fixture) { - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/287 (Aggregates over subqueries return null result set) + // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/330 (Aggregates over subqueries return null result set) public override async Task Primitive_collection_in_query() { CosmosTestEnvironment.SkipOnLinuxEmulator(); diff --git a/test/EFCore.Cosmos.FunctionalTests/Update/CosmosBulkConcurrencyTest.cs b/test/EFCore.Cosmos.FunctionalTests/Update/CosmosBulkConcurrencyTest.cs index 9e142359b6f..9c87770a31a 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Update/CosmosBulkConcurrencyTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Update/CosmosBulkConcurrencyTest.cs @@ -5,25 +5,8 @@ namespace Microsoft.EntityFrameworkCore.Update; public class CosmosBulkConcurrencyTest(CosmosBulkConcurrencyTest.ConcurrencyFixture fixture) : CosmosConcurrencyTest(fixture), IClassFixture { - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/319 - public override async Task Updating_then_deleting_the_same_entity_results_in_DbUpdateConcurrencyException() - { - CosmosTestEnvironment.SkipOnLinuxEmulator(); - - await base.Updating_then_deleting_the_same_entity_results_in_DbUpdateConcurrencyException(); - } - - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/319 - public override async Task Updating_then_updating_the_same_entity_results_in_DbUpdateConcurrencyException() - { - CosmosTestEnvironment.SkipOnLinuxEmulator(); - - await base.Updating_then_updating_the_same_entity_results_in_DbUpdateConcurrencyException(); - } - public class ConcurrencyFixture : CosmosConcurrencyTest.CosmosFixture { - protected override string StoreName => nameof(CosmosBulkConcurrencyTest); diff --git a/test/EFCore.Cosmos.FunctionalTests/Update/CosmosBulkExecutionTest.cs b/test/EFCore.Cosmos.FunctionalTests/Update/CosmosBulkExecutionTest.cs index b6bbfd9f45f..2d2b8c45e49 100644 --- a/test/EFCore.Cosmos.FunctionalTests/Update/CosmosBulkExecutionTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/Update/CosmosBulkExecutionTest.cs @@ -13,9 +13,7 @@ public class CosmosBulkExecutionTest(NonSharedFixture nonSharedFixture, CosmosBu protected override ITestStoreFactory NonSharedTestStoreFactory => CosmosTestStoreFactory.Instance; - - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/292 (Transactional batch limits not enforced) - [ConditionalFact(typeof(CosmosTestEnvironment), nameof(CosmosTestEnvironment.IsNotLinuxEmulator))] + [Fact] public virtual async Task DoesNotBatchSingleBatchableWrite() { using var context = fixture.CreateContext(); @@ -46,9 +44,7 @@ public virtual async Task AutoTransactionBehaviorNever_DoesNotThrow() await context.SaveChangesAsync(); } - - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/292 (Transactional batch limits not enforced) - [ConditionalFact(typeof(CosmosTestEnvironment), nameof(CosmosTestEnvironment.IsNotLinuxEmulator))] + [Fact] public virtual async Task AutoTransactionBehaviorWhenNeeded_Throws() { var contextFactory = await InitializeNonSharedTest( @@ -61,9 +57,7 @@ public virtual async Task AutoTransactionBehaviorWhenNeeded_Throws() Assert.Equal(BulkExecutionWithTransactionalBatchMessage, ex.Message); } - - // https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/292 (Transactional batch limits not enforced) - [ConditionalFact(typeof(CosmosTestEnvironment), nameof(CosmosTestEnvironment.IsNotLinuxEmulator))] + [Fact] public virtual async Task AutoTransactionBehaviorAlways_Throws() { var contextFactory = await InitializeNonSharedTest(