From 140d382a672db293a43650d3247912ad7128163d Mon Sep 17 00:00:00 2001 From: Ian Cooper Date: Wed, 26 Jul 2023 09:56:58 +0100 Subject: [PATCH 01/41] patch tuesday --- samples/ASBTaskQueue/Greetings/Greetings.csproj | 6 +++--- .../GreetingsSender.Web/GreetingsSender.Web.csproj | 2 +- .../KafkaSchemaRegistry/Greetings/Greetings.csproj | 4 ++-- .../GreetingsReceiverConsole.csproj | 2 +- .../SalutationAnalytics/SalutationAnalytics.csproj | 2 +- .../GreetingsEntities/GreetingsEntities.csproj | 2 +- .../SalutationEntities/SalutationEntities.csproj | 2 +- .../GreetingsPorts/GreetingsPorts.csproj | 2 +- .../SalutationAnalytics/SalutationAnalytics.csproj | 2 +- .../SalutationPorts/SalutationPorts.csproj | 2 +- .../Salutations_SqliteMigrations.csproj | 2 +- .../Paramore.Brighter.Archive.Azure.csproj | 2 +- .../Paramore.Brighter.DynamoDb.csproj | 2 +- .../Paramore.Brighter.Inbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.Inbox.MySql.csproj | 2 +- .../Paramore.Brighter.Inbox.Sqlite.csproj | 2 +- .../Paramore.Brighter.MessagingGateway.AWSSQS.csproj | 6 +++--- .../Paramore.Brighter.MessagingGateway.Kafka.csproj | 4 ++-- ...aramore.Brighter.MsSql.EntityFrameworkCore.csproj | 12 ++++++------ ...aramore.Brighter.MySql.EntityFrameworkCore.csproj | 8 ++++---- .../Paramore.Brighter.MySql.csproj | 2 +- .../Paramore.Brighter.Outbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.Outbox.MySql.csproj | 2 +- .../Paramore.Brighter.Outbox.Sqlite.csproj | 2 +- ...re.Brighter.PostgreSql.EntityFrameworkCore.csproj | 8 ++++---- ...er.ServiceActivator.Extensions.Diagnostics.csproj | 2 +- ...ramore.Brighter.Sqlite.EntityFrameworkCore.csproj | 12 ++++++------ .../Paramore.Brighter.Sqlite.csproj | 2 +- .../Paramore.Brighter.Tranformers.AWS.csproj | 4 ++-- .../Paramore.Brighter.Transformers.Azure.csproj | 2 +- .../Paramore.Brighter.Kafka.Tests.csproj | 2 +- 31 files changed, 54 insertions(+), 54 deletions(-) diff --git a/samples/ASBTaskQueue/Greetings/Greetings.csproj b/samples/ASBTaskQueue/Greetings/Greetings.csproj index 2d24d588af..1046acfaec 100644 --- a/samples/ASBTaskQueue/Greetings/Greetings.csproj +++ b/samples/ASBTaskQueue/Greetings/Greetings.csproj @@ -14,9 +14,9 @@ - - - + + + diff --git a/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj b/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj index 1b7d50c7f6..4dbf88d95d 100644 --- a/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj +++ b/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj @@ -14,7 +14,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/samples/KafkaSchemaRegistry/Greetings/Greetings.csproj b/samples/KafkaSchemaRegistry/Greetings/Greetings.csproj index 3e2c531cac..6560755cab 100644 --- a/samples/KafkaSchemaRegistry/Greetings/Greetings.csproj +++ b/samples/KafkaSchemaRegistry/Greetings/Greetings.csproj @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/samples/KafkaSchemaRegistry/GreetingsReceiverConsole/GreetingsReceiverConsole.csproj b/samples/KafkaSchemaRegistry/GreetingsReceiverConsole/GreetingsReceiverConsole.csproj index 729aa4a7a5..d202b0823f 100644 --- a/samples/KafkaSchemaRegistry/GreetingsReceiverConsole/GreetingsReceiverConsole.csproj +++ b/samples/KafkaSchemaRegistry/GreetingsReceiverConsole/GreetingsReceiverConsole.csproj @@ -4,7 +4,7 @@ Exe - + diff --git a/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj b/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj index cee8b9f9eb..f4dda8e4fc 100644 --- a/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj +++ b/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj @@ -23,7 +23,7 @@ - + diff --git a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj index 0e0ed1fc23..38812b60b1 100644 --- a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj +++ b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj index 874716934e..4346e68fe7 100644 --- a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj +++ b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj b/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj index 64fc63bb83..12c2495571 100644 --- a/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj +++ b/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj @@ -10,7 +10,7 @@ - + diff --git a/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj b/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj index 46a145bea5..7a4fc635da 100644 --- a/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj +++ b/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj @@ -34,7 +34,7 @@ - + diff --git a/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj b/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj index d9b1e7c493..35830cab2e 100644 --- a/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj +++ b/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj @@ -10,7 +10,7 @@ - + diff --git a/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj b/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj index 4eee1c27a4..8eca44b33c 100644 --- a/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj +++ b/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Paramore.Brighter.Archive.Azure/Paramore.Brighter.Archive.Azure.csproj b/src/Paramore.Brighter.Archive.Azure/Paramore.Brighter.Archive.Azure.csproj index da7fbf8efb..3e37f6a232 100644 --- a/src/Paramore.Brighter.Archive.Azure/Paramore.Brighter.Archive.Azure.csproj +++ b/src/Paramore.Brighter.Archive.Azure/Paramore.Brighter.Archive.Azure.csproj @@ -12,7 +12,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj index 7362bb3b0b..475eaea2ef 100644 --- a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj +++ b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj @@ -5,7 +5,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj index 6547f1d295..db32b1b808 100644 --- a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Inbox.MySql/Paramore.Brighter.Inbox.MySql.csproj b/src/Paramore.Brighter.Inbox.MySql/Paramore.Brighter.Inbox.MySql.csproj index d6872203d6..00faa6419c 100644 --- a/src/Paramore.Brighter.Inbox.MySql/Paramore.Brighter.Inbox.MySql.csproj +++ b/src/Paramore.Brighter.Inbox.MySql/Paramore.Brighter.Inbox.MySql.csproj @@ -9,7 +9,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj b/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj index 18ea106d31..7f1e806042 100644 --- a/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj +++ b/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj @@ -7,7 +7,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj index 3562485dfc..0709b490ac 100644 --- a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj +++ b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj @@ -9,11 +9,11 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.Kafka/Paramore.Brighter.MessagingGateway.Kafka.csproj b/src/Paramore.Brighter.MessagingGateway.Kafka/Paramore.Brighter.MessagingGateway.Kafka.csproj index ec18c7396d..fa570100eb 100644 --- a/src/Paramore.Brighter.MessagingGateway.Kafka/Paramore.Brighter.MessagingGateway.Kafka.csproj +++ b/src/Paramore.Brighter.MessagingGateway.Kafka/Paramore.Brighter.MessagingGateway.Kafka.csproj @@ -10,8 +10,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj b/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj index 9e6b258cb6..f105413e09 100644 --- a/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj @@ -27,15 +27,15 @@ - - - + + + - - - + + + diff --git a/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj b/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj index 5e54d92235..0bbdfb516c 100644 --- a/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj @@ -19,15 +19,15 @@ - + - + - + - + diff --git a/src/Paramore.Brighter.MySql/Paramore.Brighter.MySql.csproj b/src/Paramore.Brighter.MySql/Paramore.Brighter.MySql.csproj index 1b0b9eb9ba..369a1229ef 100644 --- a/src/Paramore.Brighter.MySql/Paramore.Brighter.MySql.csproj +++ b/src/Paramore.Brighter.MySql/Paramore.Brighter.MySql.csproj @@ -5,7 +5,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj index 16311792dd..0d9ef5f676 100644 --- a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Outbox.MySql/Paramore.Brighter.Outbox.MySql.csproj b/src/Paramore.Brighter.Outbox.MySql/Paramore.Brighter.Outbox.MySql.csproj index bea01a85f5..6761cf2b39 100644 --- a/src/Paramore.Brighter.Outbox.MySql/Paramore.Brighter.Outbox.MySql.csproj +++ b/src/Paramore.Brighter.Outbox.MySql/Paramore.Brighter.Outbox.MySql.csproj @@ -11,7 +11,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj b/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj index 9b31bae9dd..a2f30923e6 100644 --- a/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj +++ b/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj @@ -11,7 +11,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj b/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj index 2f55e4daaf..99fa20cac8 100644 --- a/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj @@ -23,13 +23,13 @@ - - + + - - + + diff --git a/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj b/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj index 5df6dff1ae..80386f492d 100644 --- a/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj +++ b/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj @@ -8,7 +8,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj b/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj index b4bc88067a..691cbb58e6 100644 --- a/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj @@ -21,15 +21,15 @@ - - - + + + - - - + + + diff --git a/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj b/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj index 47b9f32bb8..e3fcc83bc1 100644 --- a/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj +++ b/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj @@ -7,7 +7,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj index 65dc444d61..00b888932b 100644 --- a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj +++ b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj @@ -18,8 +18,8 @@ - - + + diff --git a/src/Paramore.Brighter.Transformers.Azure/Paramore.Brighter.Transformers.Azure.csproj b/src/Paramore.Brighter.Transformers.Azure/Paramore.Brighter.Transformers.Azure.csproj index 9638111e37..26b0191634 100644 --- a/src/Paramore.Brighter.Transformers.Azure/Paramore.Brighter.Transformers.Azure.csproj +++ b/src/Paramore.Brighter.Transformers.Azure/Paramore.Brighter.Transformers.Azure.csproj @@ -8,7 +8,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj b/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj index fc9fa24464..fe65712606 100644 --- a/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj +++ b/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From b3b97b116f64270af1f3c6730a582aee97dcd525 Mon Sep 17 00:00:00 2001 From: Ian Cooper Date: Tue, 1 Aug 2023 08:32:12 +0100 Subject: [PATCH 02/41] patch tuesday --- .../GreetingsEntities/GreetingsEntities.csproj | 2 +- .../SalutationEntities/SalutationEntities.csproj | 2 +- .../Paramore.Brighter.DynamoDb.csproj | 2 +- .../Paramore.Brighter.Inbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.MessagingGateway.AWSSQS.csproj | 6 +++--- .../Paramore.Brighter.MessagingGateway.Redis.csproj | 2 +- .../Paramore.Brighter.Outbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.Tranformers.AWS.csproj | 4 ++-- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj index 38812b60b1..a66eeff2a0 100644 --- a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj +++ b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj index 4346e68fe7..61977db47a 100644 --- a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj +++ b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj index 475eaea2ef..e0ec3ae615 100644 --- a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj +++ b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj @@ -5,7 +5,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj index db32b1b808..956f484fe0 100644 --- a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj index 0709b490ac..2187c13a33 100644 --- a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj +++ b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj @@ -9,11 +9,11 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.Redis/Paramore.Brighter.MessagingGateway.Redis.csproj b/src/Paramore.Brighter.MessagingGateway.Redis/Paramore.Brighter.MessagingGateway.Redis.csproj index db84f45f37..fce16097fc 100644 --- a/src/Paramore.Brighter.MessagingGateway.Redis/Paramore.Brighter.MessagingGateway.Redis.csproj +++ b/src/Paramore.Brighter.MessagingGateway.Redis/Paramore.Brighter.MessagingGateway.Redis.csproj @@ -10,7 +10,7 @@ - + all diff --git a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj index 0d9ef5f676..b3ce111ee9 100644 --- a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj index 00b888932b..6c7d8c255f 100644 --- a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj +++ b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj @@ -18,8 +18,8 @@ - - + + From f100184cc2d245728fb8cea5dad7e3ba2a3d940d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Aug 2023 08:41:39 +0100 Subject: [PATCH 03/41] chore(deps): bump dotnet-ef from 7.0.8 to 7.0.9 (#2748) Bumps [dotnet-ef](https://github.com/dotnet/efcore) from 7.0.8 to 7.0.9. - [Release notes](https://github.com/dotnet/efcore/releases) - [Commits](https://github.com/dotnet/efcore/compare/v7.0.8...v7.0.9) --- updated-dependencies: - dependency-name: dotnet-ef dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 812c6cdb50..2be6730d44 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "dotnet-ef": { - "version": "7.0.8", + "version": "7.0.9", "commands": [ "dotnet-ef" ] From 7e174cde39a0e0503f1806ffa66e087155d5caa9 Mon Sep 17 00:00:00 2001 From: Toby Henderson Date: Sat, 5 Aug 2023 01:00:35 +0100 Subject: [PATCH 04/41] fix(SeviceActivator): Logs unhandled exceptions in handlers as error on publishasync (#2757) --- .../MessagePump.cs | 109 ++++++++---------- 1 file changed, 48 insertions(+), 61 deletions(-) diff --git a/src/Paramore.Brighter.ServiceActivator/MessagePump.cs b/src/Paramore.Brighter.ServiceActivator/MessagePump.cs index 45589e5bad..eca54350b8 100644 --- a/src/Paramore.Brighter.ServiceActivator/MessagePump.cs +++ b/src/Paramore.Brighter.ServiceActivator/MessagePump.cs @@ -176,59 +176,76 @@ public void Run() span?.SetStatus(ActivityStatusCode.Ok); } - catch (ConfigurationException configurationException) - { - s_logger.LogCritical(configurationException, - "MessagePump: Stopping receiving of messages from {ChannelName} on thread # {ManagementThreadId}", - Channel.Name, Thread.CurrentThread.ManagedThreadId); - - RejectMessage(message); - span?.SetStatus(ActivityStatusCode.Error, - $"MessagePump: Stopping receiving of messages from {Channel.Name} on thread # {Thread.CurrentThread.ManagedThreadId}"); - Channel.Dispose(); - break; - } - catch (DeferMessageAction) - { - span?.SetStatus(ActivityStatusCode.Error, "Deferring message for later action"); - if (RequeueMessage(message)) continue; - } catch (AggregateException aggregateException) { - var (stop, requeue) = HandleProcessingException(aggregateException); + var stop = false; + var defer = false; + + foreach (var exception in aggregateException.InnerExceptions) + { + if (exception is ConfigurationException configurationException) + { + s_logger.LogCritical(configurationException, "MessagePump: Stopping receiving of messages from {ChannelName} on thread # {ManagementThreadId}", Channel.Name, Thread.CurrentThread.ManagedThreadId); + stop = true; + break; + } + + if (exception is DeferMessageAction) + { + defer = true; + continue; + } + + s_logger.LogError(exception, "MessagePump: Failed to dispatch message {Id} from {ChannelName} on thread # {ManagementThreadId}", message.Id, Channel.Name, Thread.CurrentThread.ManagedThreadId); + } - span?.SetStatus(ActivityStatusCode.Error, $"Error while dispatching, re-queueing {requeue}, rejecting {stop}"); - if (requeue) + if (defer) { - if (RequeueMessage(message)) continue; + s_logger.LogDebug("MessagePump: Deferring message {Id} from {ChannelName} on thread # {ManagementThreadId}", message.Id, Channel.Name, Thread.CurrentThread.ManagedThreadId); + span?.SetStatus(ActivityStatusCode.Error, $"Deferring message {message.Id} for later action"); + if (RequeueMessage(message)) + continue; } if (stop) { RejectMessage(message); + span?.SetStatus(ActivityStatusCode.Error, $"MessagePump: Stopping receiving of messages from {Channel.Name} on thread # {Thread.CurrentThread.ManagedThreadId}"); Channel.Dispose(); break; } + + span?.SetStatus(ActivityStatusCode.Error, $"MessagePump: Failed to dispatch message {message.Id} from {Channel.Name} on thread # {Thread.CurrentThread.ManagedThreadId}"); + } + catch (ConfigurationException configurationException) + { + s_logger.LogCritical(configurationException,"MessagePump: Stopping receiving of messages from {ChannelName} on thread # {ManagementThreadId}", Channel.Name, Thread.CurrentThread.ManagedThreadId); + RejectMessage(message); + span?.SetStatus(ActivityStatusCode.Error, $"MessagePump: Stopping receiving of messages from {Channel.Name} on thread # {Thread.CurrentThread.ManagedThreadId}"); + Channel.Dispose(); + break; + } + catch (DeferMessageAction) + { + s_logger.LogDebug("MessagePump: Deferring message {Id} from {ChannelName} on thread # {ManagementThreadId}", message.Id, Channel.Name, Thread.CurrentThread.ManagedThreadId); + + span?.SetStatus(ActivityStatusCode.Error, $"Deferring message {message.Id} for later action"); + + if (RequeueMessage(message)) continue; } catch (MessageMappingException messageMappingException) { - s_logger.LogWarning(messageMappingException, - "MessagePump: Failed to map message '{Id}' from {ChannelName} on thread # {ManagementThreadId}", - message.Id, Channel.Name, Thread.CurrentThread.ManagedThreadId); + s_logger.LogWarning(messageMappingException, "MessagePump: Failed to map message {Id} from {ChannelName} on thread # {ManagementThreadId}", message.Id, Channel.Name, Thread.CurrentThread.ManagedThreadId); IncrementUnacceptableMessageLimit(); - span?.SetStatus(ActivityStatusCode.Error, - $"MessagePump: Failed to map message '{message.Id}' from {Channel.Name} on thread # {Thread.CurrentThread.ManagedThreadId}"); + span?.SetStatus(ActivityStatusCode.Error, $"MessagePump: Failed to map message {message.Id} from {Channel.Name} on thread # {Thread.CurrentThread.ManagedThreadId}"); } catch (Exception e) { - s_logger.LogError(e, - "MessagePump: Failed to dispatch message '{Id}' from {ChannelName} on thread # {ManagementThreadId}", - message.Id, Channel.Name, Thread.CurrentThread.ManagedThreadId); + s_logger.LogError(e, "MessagePump: Failed to dispatch message '{Id}' from {ChannelName} on thread # {ManagementThreadId}", message.Id, Channel.Name, Thread.CurrentThread.ManagedThreadId); - span?.SetStatus(ActivityStatusCode.Error, - $"MessagePump: Failed to dispatch message '{message.Id}' from {Channel.Name} on thread # {Thread.CurrentThread.ManagedThreadId}"); + span?.SetStatus(ActivityStatusCode.Error,$"MessagePump: Failed to dispatch message '{message.Id}' from {Channel.Name} on thread # {Thread.CurrentThread.ManagedThreadId}"); } finally { @@ -264,36 +281,6 @@ private bool DiscardRequeuedMessagesEnabled() // i..e an async pipeline uses SendAsync/PublishAsync and a blocking pipeline uses Send/Publish protected abstract void DispatchRequest(MessageHeader messageHeader, TRequest request); - private (bool, bool) HandleProcessingException(AggregateException aggregateException) - { - var stop = false; - var requeue = false; - - foreach (var exception in aggregateException.InnerExceptions) - { - if (exception is DeferMessageAction) - { - requeue = true; - continue; - } - - if (exception is ConfigurationException) - { - s_logger.LogCritical(exception, - "MessagePump: Stopping receiving of messages from {ChannelName} on thread # {ManagementThreadId}", - Channel.Name, Thread.CurrentThread.ManagedThreadId); - stop = true; - break; - } - - s_logger.LogInformation(exception, - "MessagePump: Failed to dispatch message from {ChannelName} on thread # {ManagementThreadId}", - Channel.Name, Thread.CurrentThread.ManagedThreadId); - } - - return (stop, requeue); - } - private void IncrementUnacceptableMessageLimit() { _unacceptableMessageCount++; From f84195092340fc92101eb084542b4eb0d776f77b Mon Sep 17 00:00:00 2001 From: Toby Henderson Date: Mon, 7 Aug 2023 23:50:21 +0100 Subject: [PATCH 05/41] fix(SeviceActivator): Tests for Logs unhandled exceptions in handlers as error on publishasync (#2757) --- .../Initializer.cs | 18 ++++ .../TestDoubles/SpyCommandProcessor.cs | 46 ++++++++++ ...hen_message_is_requeued_until_rejected.cs} | 6 +- ...essage_is_requeued_until_rejectedAsync.cs} | 6 +- ...handled_exception_Then_message_is_acked.cs | 86 ++++++++++++++++++ ...d_exception_Then_message_is_acked_async.cs | 86 ++++++++++++++++++ ...hen_message_is_requeued_until_rejected.cs} | 6 +- ...essage_is_requeued_until_rejectedAsync.cs} | 6 +- ...handled_exception_Then_message_is_acked.cs | 87 ++++++++++++++++++ ...d_exception_Then_message_is_acked_async.cs | 88 +++++++++++++++++++ .../Paramore.Brighter.Core.Tests.csproj | 1 + 11 files changed, 424 insertions(+), 12 deletions(-) create mode 100644 tests/Paramore.Brighter.Core.Tests/Initializer.cs rename tests/Paramore.Brighter.Core.Tests/MessageDispatch/{When_a_command_handler_throws_Then_message_is_requeued_until_rejected.cs => When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected.cs} (92%) rename tests/Paramore.Brighter.Core.Tests/MessageDispatch/{When_a_command_handler_throws_Then_message_is_requeued_until_rejectedAsync.cs => When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync.cs} (92%) create mode 100644 tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_unhandled_exception_Then_message_is_acked.cs create mode 100644 tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_unhandled_exception_Then_message_is_acked_async.cs rename tests/Paramore.Brighter.Core.Tests/MessageDispatch/{When_an_event_handler_throws_Then_message_is_requeued_until_rejected.cs => When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected.cs} (92%) rename tests/Paramore.Brighter.Core.Tests/MessageDispatch/{When_an_event_handler_throws_Then_message_is_requeued_until_rejectedAsync.cs => When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync.cs} (92%) create mode 100644 tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_unhandled_exception_Then_message_is_acked.cs create mode 100644 tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_unhandled_exception_Then_message_is_acked_async.cs diff --git a/tests/Paramore.Brighter.Core.Tests/Initializer.cs b/tests/Paramore.Brighter.Core.Tests/Initializer.cs new file mode 100644 index 0000000000..f3e4b9330b --- /dev/null +++ b/tests/Paramore.Brighter.Core.Tests/Initializer.cs @@ -0,0 +1,18 @@ +using System.Runtime.CompilerServices; +using Microsoft.Extensions.Logging; +using Paramore.Brighter.Logging; +using Serilog; + +namespace Paramore.Brighter.Core.Tests +{ + class Initializer + { + [ModuleInitializer] + public static void InitializeTestLogger() + { + var logger = new LoggerConfiguration().WriteTo.TestCorrelator().CreateLogger(); + ApplicationLogging.LoggerFactory = new LoggerFactory().AddSerilog(logger); + } + } + +} diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/TestDoubles/SpyCommandProcessor.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/TestDoubles/SpyCommandProcessor.cs index c361054f72..edeae3a976 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/TestDoubles/SpyCommandProcessor.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/TestDoubles/SpyCommandProcessor.cs @@ -256,4 +256,50 @@ public override async Task PublishAsync(T @event, bool continueOnCapturedCont } } + + internal class SpyExceptionCommandProcessor : SpyCommandProcessor + { + public int SendCount { get; set; } + public int PublishCount { get; set; } + + public SpyExceptionCommandProcessor() + { + SendCount = 0; + PublishCount = 0; + } + + public override void Send(T command) + { + base.Send(command); + SendCount++; + throw new Exception(); + } + + public override void Publish(T @event) + { + base.Publish(@event); + PublishCount++; + + var exceptions = new List { new Exception() }; + + throw new AggregateException("Failed to publish to one more handlers successfully, see inner exceptions for details", exceptions); + } + public override async Task SendAsync(T command, bool continueOnCapturedContext = false, CancellationToken cancellationToken = default) + { + await base.SendAsync(command, continueOnCapturedContext, cancellationToken); + SendCount++; + throw new Exception(); + } + + public override async Task PublishAsync(T @event, bool continueOnCapturedContext = false, CancellationToken cancellationToken = default) + { + await base.PublishAsync(@event, continueOnCapturedContext, cancellationToken); + PublishCount++; + + var exceptions = new List { new Exception() }; + + throw new AggregateException("Failed to publish to one more handlers successfully, see inner exceptions for details", exceptions); + } + + } } diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_Then_message_is_requeued_until_rejected.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected.cs similarity index 92% rename from tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_Then_message_is_requeued_until_rejected.cs rename to tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected.cs index b8875445f3..68584d7b5b 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_Then_message_is_requeued_until_rejected.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected.cs @@ -33,14 +33,14 @@ THE SOFTWARE. */ namespace Paramore.Brighter.Core.Tests.MessageDispatch { - public class MessagePumpCommandProcessingExceptionTests + public class MessagePumpCommandProcessingDeferMessageActionTests { private readonly IAmAMessagePump _messagePump; private readonly FakeChannel _channel; private readonly SpyRequeueCommandProcessor _commandProcessor; private readonly int _requeueCount = 5; - public MessagePumpCommandProcessingExceptionTests() + public MessagePumpCommandProcessingDeferMessageActionTests() { _commandProcessor = new SpyRequeueCommandProcessor(); _channel = new FakeChannel(); @@ -59,7 +59,7 @@ public MessagePumpCommandProcessingExceptionTests() } [Fact] - public void When_a_command_handler_throws_Then_message_is_requeued_until_rejected() + public void When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected() { var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); Task.Delay(1000).Wait(); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_Then_message_is_requeued_until_rejectedAsync.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync.cs similarity index 92% rename from tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_Then_message_is_requeued_until_rejectedAsync.cs rename to tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync.cs index 5ebf48ca08..b920219e53 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_Then_message_is_requeued_until_rejectedAsync.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync.cs @@ -33,14 +33,14 @@ THE SOFTWARE. */ namespace Paramore.Brighter.Core.Tests.MessageDispatch { - public class MessagePumpCommandProcessingExceptionTestsAsync + public class MessagePumpCommandProcessingDeferMessageActionTestsAsync { private readonly IAmAMessagePump _messagePump; private readonly FakeChannel _channel; private readonly SpyRequeueCommandProcessor _commandProcessor; private readonly int _requeueCount = 5; - public MessagePumpCommandProcessingExceptionTestsAsync() + public MessagePumpCommandProcessingDeferMessageActionTestsAsync() { _commandProcessor = new SpyRequeueCommandProcessor(); _channel = new FakeChannel(); @@ -58,7 +58,7 @@ public MessagePumpCommandProcessingExceptionTestsAsync() } [Fact] - public void When_a_command_handler_throws_Then_message_is_requeued_until_rejectedAsync() + public void When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync() { var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); Task.Delay(1000).Wait(); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_unhandled_exception_Then_message_is_acked.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_unhandled_exception_Then_message_is_acked.cs new file mode 100644 index 0000000000..d053270dbb --- /dev/null +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_unhandled_exception_Then_message_is_acked.cs @@ -0,0 +1,86 @@ +#region Licence +/* The MIT License (MIT) +Copyright © 2014 Ian Cooper + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. */ + +#endregion + +using System; +using System.Threading.Tasks; +using FluentAssertions; +using Paramore.Brighter.Core.Tests.CommandProcessors.TestDoubles; +using Paramore.Brighter.Core.Tests.MessageDispatch.TestDoubles; +using Xunit; +using Paramore.Brighter.ServiceActivator; +using Paramore.Brighter.ServiceActivator.TestHelpers; +using Serilog.Sinks.TestCorrelator; +using Serilog.Events; + +namespace Paramore.Brighter.Core.Tests.MessageDispatch +{ + public class MessagePumpCommandProcessingExceptionTests + { + private readonly IAmAMessagePump _messagePump; + private readonly FakeChannel _channel; + private readonly SpyExceptionCommandProcessor _commandProcessor; + private readonly int _requeueCount = 5; + + public MessagePumpCommandProcessingExceptionTests() + { + _commandProcessor = new SpyExceptionCommandProcessor(); + _channel = new FakeChannel(); + var messageMapperRegistry = new MessageMapperRegistry( + new SimpleMessageMapperFactory(_ => new MyCommandMessageMapper())); + messageMapperRegistry.Register(); + _messagePump = new MessagePumpBlocking(_commandProcessor, messageMapperRegistry) + { Channel = _channel, TimeoutInMilliseconds = 5000, RequeueCount = _requeueCount }; + + var msg = new TransformPipelineBuilder(messageMapperRegistry, null) + .BuildWrapPipeline() + .WrapAsync(new MyCommand()) + .GetAwaiter().GetResult(); + + _channel.Enqueue(msg); + } + + [Fact] + public void When_a_command_handler_throws_unhandled_exception_Then_message_is_acked() + { + using (TestCorrelator.CreateContext()) + { + var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); + Task.Delay(1000).Wait(); + + var quitMessage = new Message(new MessageHeader(Guid.Empty, "", MessageType.MT_QUIT), + new MessageBody("")); + _channel.Enqueue(quitMessage); + + Task.WaitAll(new[] {task}); + + _channel.AcknowledgeCount.Should().Be(1); + + TestCorrelator.GetLogEventsFromCurrentContext() + .Should().Contain(x => x.Level == LogEventLevel.Error) + .Which.MessageTemplate.Text + .Should().Be("MessagePump: Failed to dispatch message '{Id}' from {ChannelName} on thread # {ManagementThreadId}"); + } + } + } +} diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_unhandled_exception_Then_message_is_acked_async.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_unhandled_exception_Then_message_is_acked_async.cs new file mode 100644 index 0000000000..69b9eaaaf8 --- /dev/null +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_unhandled_exception_Then_message_is_acked_async.cs @@ -0,0 +1,86 @@ +#region Licence +/* The MIT License (MIT) +Copyright © 2014 Ian Cooper + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. */ + +#endregion + +using System; +using System.Threading.Tasks; +using FluentAssertions; +using Paramore.Brighter.Core.Tests.CommandProcessors.TestDoubles; +using Paramore.Brighter.Core.Tests.MessageDispatch.TestDoubles; +using Xunit; +using Paramore.Brighter.ServiceActivator; +using Paramore.Brighter.ServiceActivator.TestHelpers; +using Serilog.Events; +using Serilog.Sinks.TestCorrelator; + +namespace Paramore.Brighter.Core.Tests.MessageDispatch +{ + public class MessagePumpCommandProcessingExceptionTestsAsync + { + private readonly IAmAMessagePump _messagePump; + private readonly FakeChannel _channel; + private readonly SpyExceptionCommandProcessor _commandProcessor; + private readonly int _requeueCount = 5; + + public MessagePumpCommandProcessingExceptionTestsAsync() + { + + _commandProcessor = new SpyExceptionCommandProcessor(); + _channel = new FakeChannel(); + var messageMapperRegistry = new MessageMapperRegistry( + new SimpleMessageMapperFactory(_ => new MyCommandMessageMapper())); + messageMapperRegistry.Register(); + + _messagePump = new MessagePumpAsync(_commandProcessor, messageMapperRegistry) { Channel = _channel, TimeoutInMilliseconds = 5000, RequeueCount = _requeueCount }; + + var msg = new TransformPipelineBuilder(messageMapperRegistry, null) + .BuildWrapPipeline() + .WrapAsync(new MyCommand()) + .GetAwaiter().GetResult(); + _channel.Enqueue(msg); + } + + [Fact] + public void When_a_command_handler_throws_unhandled_exception_Then_message_is_acked_async() + { + using (TestCorrelator.CreateContext()) + { + var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); + Task.Delay(1000).Wait(); + + var quitMessage = new Message(new MessageHeader(Guid.Empty, "", MessageType.MT_QUIT), + new MessageBody("")); + _channel.Enqueue(quitMessage); + + Task.WaitAll(new[] {task}); + + _channel.AcknowledgeCount.Should().Be(1); + + TestCorrelator.GetLogEventsFromCurrentContext() + .Should().Contain(x => x.Level == LogEventLevel.Error) + .Which.MessageTemplate.Text + .Should().Be("MessagePump: Failed to dispatch message '{Id}' from {ChannelName} on thread # {ManagementThreadId}"); + } + } + } +} diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_Then_message_is_requeued_until_rejected.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected.cs similarity index 92% rename from tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_Then_message_is_requeued_until_rejected.cs rename to tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected.cs index f0e77f51a7..f6492a6ac0 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_Then_message_is_requeued_until_rejected.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected.cs @@ -33,14 +33,14 @@ THE SOFTWARE. */ namespace Paramore.Brighter.Core.Tests.MessageDispatch { - public class MessagePumpEventProcessingExceptionTests + public class MessagePumpEventProcessingDeferMessageActionTests { private readonly IAmAMessagePump _messagePump; private readonly FakeChannel _channel; private readonly SpyRequeueCommandProcessor _commandProcessor; private readonly int _requeueCount = 5; - public MessagePumpEventProcessingExceptionTests() + public MessagePumpEventProcessingDeferMessageActionTests() { _commandProcessor = new SpyRequeueCommandProcessor(); _channel = new FakeChannel(); @@ -59,7 +59,7 @@ public MessagePumpEventProcessingExceptionTests() } [Fact] - public void When_an_event_handler_throws_Then_message_is_requeued_until_rejected() + public void When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected() { var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); Task.Delay(1000).Wait(); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_Then_message_is_requeued_until_rejectedAsync.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync.cs similarity index 92% rename from tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_Then_message_is_requeued_until_rejectedAsync.cs rename to tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync.cs index 27da5b7fe4..a2517795a5 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_Then_message_is_requeued_until_rejectedAsync.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync.cs @@ -33,14 +33,14 @@ THE SOFTWARE. */ namespace Paramore.Brighter.Core.Tests.MessageDispatch { - public class MessagePumpEventProcessingExceptionTestsAsync + public class MessagePumpEventProcessingDeferMessageActionTestsAsync { private readonly IAmAMessagePump _messagePump; private readonly FakeChannel _channel; private readonly SpyRequeueCommandProcessor _commandProcessor; private readonly int _requeueCount = 5; - public MessagePumpEventProcessingExceptionTestsAsync() + public MessagePumpEventProcessingDeferMessageActionTestsAsync() { _commandProcessor = new SpyRequeueCommandProcessor(); _channel = new FakeChannel(); @@ -58,7 +58,7 @@ public MessagePumpEventProcessingExceptionTestsAsync() } [Fact] - public void When_an_event_handler_throws_Then_message_is_requeued_until_rejectedAsync() + public void When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync() { var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); Task.Delay(1000).Wait(); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_unhandled_exception_Then_message_is_acked.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_unhandled_exception_Then_message_is_acked.cs new file mode 100644 index 0000000000..1f8db165cc --- /dev/null +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_unhandled_exception_Then_message_is_acked.cs @@ -0,0 +1,87 @@ +#region Licence +/* The MIT License (MIT) +Copyright © 2014 Ian Cooper + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. */ + +#endregion + +using System; +using System.Threading.Tasks; +using FluentAssertions; +using Paramore.Brighter.Core.Tests.CommandProcessors.TestDoubles; +using Paramore.Brighter.Core.Tests.MessageDispatch.TestDoubles; +using Xunit; +using Paramore.Brighter.ServiceActivator; +using Paramore.Brighter.ServiceActivator.TestHelpers; +using Serilog.Events; +using Serilog.Sinks.TestCorrelator; + +namespace Paramore.Brighter.Core.Tests.MessageDispatch +{ + public class MessagePumpEventProcessingExceptionTests + { + private readonly IAmAMessagePump _messagePump; + private readonly FakeChannel _channel; + private readonly SpyExceptionCommandProcessor _commandProcessor; + private readonly int _requeueCount = 5; + + public MessagePumpEventProcessingExceptionTests() + { + _commandProcessor = new SpyExceptionCommandProcessor(); + _channel = new FakeChannel(); + var messageMapperRegistry = new MessageMapperRegistry( + new SimpleMessageMapperFactory(_ => new MyEventMessageMapper())); + messageMapperRegistry.Register(); + + _messagePump = new MessagePumpBlocking(_commandProcessor, messageMapperRegistry) { Channel = _channel, TimeoutInMilliseconds = 5000, RequeueCount = _requeueCount }; + + var transformPipelineBuilder = new TransformPipelineBuilder(messageMapperRegistry, null); + + var msg = transformPipelineBuilder.BuildWrapPipeline() + .WrapAsync(new MyEvent()).GetAwaiter().GetResult(); + + _channel.Enqueue(msg); + } + + [Fact] + public void When_an_event_handler_throws_unhandled_exception_Then_message_is_acked() + { + using (TestCorrelator.CreateContext()) + { + var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); + Task.Delay(1000).Wait(); + + var quitMessage = new Message(new MessageHeader(Guid.Empty, "", MessageType.MT_QUIT), + new MessageBody("")); + _channel.Enqueue(quitMessage); + + Task.WaitAll(new[] {task}); + + _channel.AcknowledgeCount.Should().Be(1); + + TestCorrelator.GetLogEventsFromCurrentContext() + .Should().Contain(x => x.Level == LogEventLevel.Error) + .Which.MessageTemplate.Text + .Should().Be( + "MessagePump: Failed to dispatch message {Id} from {ChannelName} on thread # {ManagementThreadId}"); + } + } + } +} diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_unhandled_exception_Then_message_is_acked_async.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_unhandled_exception_Then_message_is_acked_async.cs new file mode 100644 index 0000000000..a5bb79c03a --- /dev/null +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_unhandled_exception_Then_message_is_acked_async.cs @@ -0,0 +1,88 @@ +#region Licence +/* The MIT License (MIT) +Copyright © 2014 Ian Cooper + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. */ + +#endregion + +using System; +using System.Threading.Tasks; +using FluentAssertions; +using Paramore.Brighter.Core.Tests.CommandProcessors.TestDoubles; +using Paramore.Brighter.Core.Tests.MessageDispatch.TestDoubles; +using Xunit; +using Paramore.Brighter.ServiceActivator; +using Paramore.Brighter.ServiceActivator.TestHelpers; +using Serilog.Events; +using Serilog.Sinks.TestCorrelator; + +namespace Paramore.Brighter.Core.Tests.MessageDispatch +{ + public class MessagePumpEventProcessingExceptionTestsAsync + { + private readonly IAmAMessagePump _messagePump; + private readonly FakeChannel _channel; + private readonly SpyExceptionCommandProcessor _commandProcessor; + private readonly int _requeueCount = 5; + + public MessagePumpEventProcessingExceptionTestsAsync() + { + _commandProcessor = new SpyExceptionCommandProcessor(); + _channel = new FakeChannel(); + var messageMapperRegistry = new MessageMapperRegistry( + new SimpleMessageMapperFactory(_ => new MyEventMessageMapper())); + messageMapperRegistry.Register(); + + _messagePump = new MessagePumpAsync(_commandProcessor, messageMapperRegistry) + { + Channel = _channel, TimeoutInMilliseconds = 5000, RequeueCount = _requeueCount + }; + + var msg = new TransformPipelineBuilder(messageMapperRegistry, null) + .BuildWrapPipeline().WrapAsync(new MyEvent()) + .GetAwaiter().GetResult(); + _channel.Enqueue(msg); + } + + [Fact] + public void When_an_event_handler_throws_unhandled_exception_Then_message_is_acked_async() + { + using (TestCorrelator.CreateContext()) + { + var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); + Task.Delay(1000).Wait(); + + var quitMessage = new Message(new MessageHeader(Guid.Empty, "", MessageType.MT_QUIT), + new MessageBody("")); + _channel.Enqueue(quitMessage); + + Task.WaitAll(new[] {task}); + + _channel.AcknowledgeCount.Should().Be(1); + + TestCorrelator.GetLogEventsFromCurrentContext() + .Should().Contain(x => x.Level == LogEventLevel.Error) + .Which.MessageTemplate.Text + .Should().Be( + "MessagePump: Failed to dispatch message {Id} from {ChannelName} on thread # {ManagementThreadId}"); + } + } + } +} diff --git a/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj b/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj index 9f4cb41bab..67b9826524 100644 --- a/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj +++ b/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj @@ -18,6 +18,7 @@ + From 4a0fb3633a411d24c457d927f29a171d29d7c8aa Mon Sep 17 00:00:00 2001 From: Toby Henderson Date: Tue, 8 Aug 2023 12:16:43 +0100 Subject: [PATCH 06/41] chore(deps): AWSSDK, Microsoft.NET.Test.Sdk, Moq --- .../GreetingsEntities/GreetingsEntities.csproj | 2 +- .../SalutationEntities/SalutationEntities.csproj | 2 +- .../Paramore.Brighter.DynamoDb.csproj | 2 +- .../Paramore.Brighter.Inbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.MessagingGateway.AWSSQS.csproj | 6 +++--- .../Paramore.Brighter.Outbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.Tranformers.AWS.csproj | 4 ++-- .../Paramore.Brighter.AWS.Tests.csproj | 2 +- .../Paramore.Brighter.Azure.Tests.csproj | 2 +- .../Paramore.Brighter.AzureServiceBus.Tests.csproj | 4 ++-- .../Paramore.Brighter.Core.Tests.csproj | 2 +- .../Paramore.Brighter.DynamoDB.Tests.csproj | 2 +- .../Paramore.Brighter.EventStore.Tests.csproj | 2 +- .../Paramore.Brighter.Extensions.Tests.csproj | 2 +- .../Paramore.Brighter.InMemory.Tests.csproj | 2 +- .../Paramore.Brighter.Kafka.Tests.csproj | 2 +- .../Paramore.Brighter.MSSQL.Tests.csproj | 2 +- .../Paramore.Brighter.MySQL.Tests.csproj | 2 +- .../Paramore.Brighter.PostgresSQL.Tests.csproj | 2 +- .../Paramore.Brighter.RESTMS.Tests.csproj | 2 +- .../Paramore.Brighter.RMQ.Tests.csproj | 2 +- .../Paramore.Brighter.Redis.Tests.csproj | 2 +- .../Paramore.Brighter.Sqlite.Tests.csproj | 2 +- 23 files changed, 27 insertions(+), 27 deletions(-) diff --git a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj index a66eeff2a0..6baf88b6b9 100644 --- a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj +++ b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj index 61977db47a..665c88035d 100644 --- a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj +++ b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj index e0ec3ae615..d14a31a016 100644 --- a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj +++ b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj @@ -5,7 +5,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj index 956f484fe0..0c807a1d9f 100644 --- a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj index 2187c13a33..8021a863e5 100644 --- a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj +++ b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj @@ -9,11 +9,11 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj index b3ce111ee9..8d7fcb8397 100644 --- a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj index 6c7d8c255f..9890e2db11 100644 --- a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj +++ b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj @@ -18,8 +18,8 @@ - - + + diff --git a/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj b/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj index 7e967e2c7b..1c6f98125d 100644 --- a/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj +++ b/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj @@ -12,7 +12,7 @@ - + diff --git a/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj b/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj index c17857c65a..42089e6230 100644 --- a/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj +++ b/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj @@ -11,7 +11,7 @@ - + diff --git a/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj b/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj index 9b207f082a..f108a41a51 100644 --- a/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj +++ b/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj @@ -8,8 +8,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj b/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj index 67b9826524..4569637c1e 100644 --- a/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj +++ b/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj @@ -15,7 +15,7 @@ - + diff --git a/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj b/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj index d9867a4358..ef0b139973 100644 --- a/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj +++ b/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj @@ -12,7 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj b/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj index 95d10485a9..3176bd09dd 100644 --- a/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj +++ b/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj @@ -12,7 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj b/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj index 784ae75f61..538edfbb10 100644 --- a/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj +++ b/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj b/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj index 16a26a4d19..8c6992c0e8 100644 --- a/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj +++ b/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj b/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj index fe65712606..a4d8af1b09 100644 --- a/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj +++ b/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj @@ -12,7 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj b/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj index 1a23bf104c..18a3f7e29e 100644 --- a/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj +++ b/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj @@ -14,7 +14,7 @@ - + all diff --git a/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj b/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj index ee3bd88656..bf3b420b91 100644 --- a/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj +++ b/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj @@ -13,7 +13,7 @@ - + all diff --git a/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj b/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj index 52482e5d6c..b0c8b59c8b 100644 --- a/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj +++ b/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj @@ -13,7 +13,7 @@ - + all diff --git a/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj b/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj index 2cac4c2915..454b03961b 100644 --- a/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj +++ b/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj b/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj index 021a5797c6..3f85eca548 100644 --- a/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj +++ b/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj b/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj index 41e8e30fa0..f2bceaf6e9 100644 --- a/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj +++ b/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj b/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj index 2713d002fd..90a9865ab7 100644 --- a/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj +++ b/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all From e8898cd144a7e3ca38a3a02651967f7b90fd11ea Mon Sep 17 00:00:00 2001 From: Toby Henderson Date: Wed, 9 Aug 2023 17:22:10 +0100 Subject: [PATCH 07/41] fix(Moq): Removed Moq and moved tests to FakeItEasy #2773 (#2775) * fix(Moq): Removed Moq and moved tests to FakeItEasy * deleted comments --- .../AzureServiceBusConsumerTests.cs | 263 +++++++++--------- .../AzureServiceBusMessageProducerTests.cs | 125 ++++----- ...more.Brighter.AzureServiceBus.Tests.csproj | 6 +- 3 files changed, 200 insertions(+), 194 deletions(-) diff --git a/tests/Paramore.Brighter.AzureServiceBus.Tests/AzureServiceBusConsumerTests.cs b/tests/Paramore.Brighter.AzureServiceBus.Tests/AzureServiceBusConsumerTests.cs index 588150e604..5c01e62e2b 100644 --- a/tests/Paramore.Brighter.AzureServiceBus.Tests/AzureServiceBusConsumerTests.cs +++ b/tests/Paramore.Brighter.AzureServiceBus.Tests/AzureServiceBusConsumerTests.cs @@ -1,11 +1,10 @@ using System; using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; using Azure.Messaging.ServiceBus; -using Moq; +using FakeItEasy; using Paramore.Brighter.MessagingGateway.AzureServiceBus; using Paramore.Brighter.MessagingGateway.AzureServiceBus.AzureServiceBusWrappers; using Xunit; @@ -14,47 +13,49 @@ namespace Paramore.Brighter.AzureServiceBus.Tests { public class AzureServiceBusConsumerTests { - private readonly Mock _nameSpaceManagerWrapper; + private readonly IAdministrationClientWrapper _nameSpaceManagerWrapper; private readonly AzureServiceBusConsumer _azureServiceBusConsumer; - private readonly Mock _messageReceiver; - private readonly Mock _mockMessageProducer; - private readonly Mock _mockMessageReceiver; + private readonly IServiceBusReceiverWrapper _messageReceiver; + private readonly IAmAMessageProducerSync _mockMessageProducer; + private readonly IServiceBusReceiverProvider _mockMessageReceiver; private readonly AzureServiceBusSubscriptionConfiguration _subConfig = new AzureServiceBusSubscriptionConfiguration(); public AzureServiceBusConsumerTests() { - _nameSpaceManagerWrapper = new Mock(); - _mockMessageProducer = new Mock(); - _mockMessageReceiver = new Mock(); + _nameSpaceManagerWrapper = A.Fake(); + _mockMessageProducer = A.Fake(); + _mockMessageReceiver = A.Fake(); - _messageReceiver = new Mock(); + _messageReceiver = A.Fake (); - _mockMessageReceiver.Setup(x => x.Get("topic", "subscription", ServiceBusReceiveMode.ReceiveAndDelete, false)).Returns(_messageReceiver.Object); + A.CallTo(() => + _mockMessageReceiver.Get("topic", "subscription", ServiceBusReceiveMode.ReceiveAndDelete, false)) + .Returns(_messageReceiver); - _azureServiceBusConsumer = new AzureServiceBusConsumer("topic", "subscription", _mockMessageProducer.Object, - _nameSpaceManagerWrapper.Object, _mockMessageReceiver.Object, makeChannels: OnMissingChannel.Create, subscriptionConfiguration: _subConfig); + _azureServiceBusConsumer = new AzureServiceBusConsumer("topic", "subscription", _mockMessageProducer, + _nameSpaceManagerWrapper, _mockMessageReceiver, makeChannels: OnMissingChannel.Create, subscriptionConfiguration: _subConfig); } [Fact] public void When_a_subscription_exists_and_messages_are_in_the_queue_the_messages_are_returned() { - _nameSpaceManagerWrapper.Setup(f => f.SubscriptionExists("topic", "subscription")).Returns(true); + A.CallTo(() => _nameSpaceManagerWrapper.SubscriptionExists("topic", "subscription")).Returns(true); var brokeredMessageList = new List(); - var message1 = new Mock(); + var message1 = A.Fake(); - message1.Setup(m => m.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); - message1.Setup(m => m.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_EVENT" } }); - var message2 = new Mock(); + A.CallTo(() => message1.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); + A.CallTo(() => message1.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_EVENT" } }); + var message2 = A.Fake(); - message2.Setup(m => m.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody2")); - message2.Setup(m => m.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_DOCUMENT" } }); - brokeredMessageList.Add(message1.Object); - brokeredMessageList.Add(message2.Object); + A.CallTo(() => message2.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody2")); + A.CallTo(() => message2.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_DOCUMENT" } }); + brokeredMessageList.Add(message1); + brokeredMessageList.Add(message2); - _messageReceiver.Setup(x => x.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); + A.CallTo(() => _messageReceiver.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); Message[] result = _azureServiceBusConsumer.Receive(400); @@ -70,35 +71,36 @@ public void When_a_subscription_exists_and_messages_are_in_the_queue_the_message [Fact] public void When_a_subscription_does_not_exist_and_messages_are_in_the_queue_then_the_subscription_is_created_and_messages_are_returned() { - _nameSpaceManagerWrapper.Setup(f => f.SubscriptionExists("topic", "subscription")).Returns(false); + A.CallTo(() => _nameSpaceManagerWrapper.SubscriptionExists("topic", "subscription")).Returns(false); var brokeredMessageList = new List(); - var message1 = new Mock(); + var message1 = A.Fake(); - message1.Setup(m => m.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); - message1.Setup(m => m.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_EVENT" } }); - brokeredMessageList.Add(message1.Object); + A.CallTo(() => message1.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); + A.CallTo(() => message1.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_EVENT" } }); + brokeredMessageList.Add(message1); - _messageReceiver.Setup(x => x.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); + A.CallTo(() => _messageReceiver.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); Message[] result = _azureServiceBusConsumer.Receive(400); - _nameSpaceManagerWrapper.Verify(f => f.CreateSubscription("topic", "subscription", _subConfig)); + A.CallTo(() => _nameSpaceManagerWrapper.CreateSubscription("topic", "subscription", _subConfig)).MustHaveHappened(); + //A.CallTo(() => _nameSpaceManagerWrapper.f => f.CreateSubscription("topic", "subscription", _subConfig)).MustHaveHappened(); Assert.Equal("somebody", result[0].Body.Value); } [Fact] public void When_a_message_is_a_command_type_then_the_message_type_is_set_correctly() { - _nameSpaceManagerWrapper.Setup(f => f.SubscriptionExists("topic", "subscription")).Returns(true); + A.CallTo(() => _nameSpaceManagerWrapper.SubscriptionExists("topic", "subscription")).Returns(true); var brokeredMessageList = new List(); - var message1 = new Mock(); + var message1 = A.Fake(); - message1.Setup(m => m.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); - message1.Setup(m => m.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_COMMAND" } }); - brokeredMessageList.Add(message1.Object); + A.CallTo(() => message1.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); + A.CallTo(() => message1.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_COMMAND" } }); + brokeredMessageList.Add(message1); - _messageReceiver.Setup(x => x.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); + A.CallTo(() => _messageReceiver.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); Message[] result = _azureServiceBusConsumer.Receive(400); @@ -110,15 +112,15 @@ public void When_a_message_is_a_command_type_then_the_message_type_is_set_correc [Fact] public void When_a_message_is_a_command_type_and_it_is_specified_in_funny_casing_then_the_message_type_is_set_correctly() { - _nameSpaceManagerWrapper.Setup(f => f.SubscriptionExists("topic", "subscription")).Returns(true); + A.CallTo(() => _nameSpaceManagerWrapper.SubscriptionExists("topic", "subscription")).Returns(true); var brokeredMessageList = new List(); - var message1 = new Mock(); - message1.Setup(m => m.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); - message1.Setup(m => m.ApplicationProperties).Returns(new Dictionary { { "MessageType", "Mt_COmmAND" } }); - brokeredMessageList.Add(message1.Object); + var message1 = A.Fake(); + A.CallTo(() => message1.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); + A.CallTo(() => message1.ApplicationProperties).Returns(new Dictionary { { "MessageType", "Mt_COmmAND" } }); + brokeredMessageList.Add(message1); - _messageReceiver.Setup(x => x.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); + A.CallTo(() => _messageReceiver.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); Message[] result = _azureServiceBusConsumer.Receive(400); @@ -130,16 +132,16 @@ public void When_a_message_is_a_command_type_and_it_is_specified_in_funny_casing [Fact] public void When_the_specified_message_type_is_unknown_then_it_should_default_to_MT_EVENT() { - _nameSpaceManagerWrapper.Setup(f => f.SubscriptionExists("topic", "subscription")).Returns(true); + A.CallTo(() => _nameSpaceManagerWrapper.SubscriptionExists("topic", "subscription")).Returns(true); var brokeredMessageList = new List(); - var message1 = new Mock(); + var message1 = A.Fake(); - message1.Setup(m => m.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); - message1.Setup(m => m.ApplicationProperties).Returns(new Dictionary { { "MessageType", "wrong_message_type" } }); - brokeredMessageList.Add(message1.Object); + A.CallTo(() => message1.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); + A.CallTo(() => message1.ApplicationProperties).Returns(new Dictionary { { "MessageType", "wrong_message_type" } }); + brokeredMessageList.Add(message1); - _messageReceiver.Setup(x => x.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); + A.CallTo(() => _messageReceiver.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); Message[] result = _azureServiceBusConsumer.Receive(400); @@ -149,15 +151,15 @@ public void When_the_specified_message_type_is_unknown_then_it_should_default_to [Fact] public void When_the_message_type_is_not_specified_it_should_default_to_MT_EVENT() { - _nameSpaceManagerWrapper.Setup(f => f.SubscriptionExists("topic", "subscription")).Returns(true); + A.CallTo(() => _nameSpaceManagerWrapper.SubscriptionExists("topic", "subscription")).Returns(true); var brokeredMessageList = new List(); - var message1 = new Mock(); - message1.Setup(m => m.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); - message1.Setup(m => m.ApplicationProperties).Returns(new Dictionary()); - brokeredMessageList.Add(message1.Object); + var message1 = A.Fake(); + A.CallTo(() => message1.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); + A.CallTo(() => message1.ApplicationProperties).Returns(new Dictionary()); + brokeredMessageList.Add(message1); - _messageReceiver.Setup(x => x.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); + A.CallTo(() => _messageReceiver.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); Message[] result = _azureServiceBusConsumer.Receive(400); @@ -169,16 +171,16 @@ public void When_the_message_type_is_not_specified_it_should_default_to_MT_EVENT [Fact] public void When_the_user_properties_on_the_azure_sb_message_is_null_it_should_default_to_message_type_to_MT_EVENT() { - _nameSpaceManagerWrapper.Setup(f => f.SubscriptionExists("topic", "subscription")).Returns(true); + A.CallTo(() => _nameSpaceManagerWrapper.SubscriptionExists("topic", "subscription")).Returns(true); var brokeredMessageList = new List(); - var message1 = new Mock(); - message1.Setup(m => m.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); - message1.Setup(m => m.ApplicationProperties).Returns(new Dictionary()); - brokeredMessageList.Add(message1.Object); + var message1 = A.Fake(); + A.CallTo(() => message1.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); + A.CallTo(() => message1.ApplicationProperties).Returns(new Dictionary()); + brokeredMessageList.Add(message1); - _messageReceiver.Setup(x => x.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); + A.CallTo(() => _messageReceiver.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); Message[] result = _azureServiceBusConsumer.Receive(400); @@ -190,10 +192,10 @@ public void When_the_user_properties_on_the_azure_sb_message_is_null_it_should_d [Fact] public void When_there_are_no_messages_then_it_returns_an_empty_array() { - _nameSpaceManagerWrapper.Setup(f => f.SubscriptionExists("topic", "subscription")).Returns(true); + A.CallTo(() => _nameSpaceManagerWrapper.SubscriptionExists("topic", "subscription")).Returns(true); var brokeredMessageList = new List(); - _messageReceiver.Setup(x => x.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); + A.CallTo(() => _messageReceiver.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); Message[] result = _azureServiceBusConsumer.Receive(400); Assert.Empty(result); @@ -202,22 +204,22 @@ public void When_there_are_no_messages_then_it_returns_an_empty_array() [Fact] public void When_trying_to_create_a_subscription_which_was_already_created_by_another_thread_it_should_ignore_the_error() { - _nameSpaceManagerWrapper.Setup(f => f.SubscriptionExists("topic", "subscription")).Returns(false); - _nameSpaceManagerWrapper.Setup(f => f.CreateSubscription("topic", "subscription", _subConfig)) + A.CallTo(() => _nameSpaceManagerWrapper.SubscriptionExists("topic", "subscription")).Returns(false); + A.CallTo(() => _nameSpaceManagerWrapper.CreateSubscription("topic", "subscription", _subConfig)) .Throws(new ServiceBusException("whatever", ServiceBusFailureReason.MessagingEntityAlreadyExists)); var brokeredMessageList = new List(); - var message1 = new Mock(); + var message1 = A.Fake(); - message1.Setup(m => m.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); - message1.Setup(m => m.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_EVENT" } }); - brokeredMessageList.Add(message1.Object); + A.CallTo(() => message1.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); + A.CallTo(() => message1.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_EVENT" } }); + brokeredMessageList.Add(message1); - _messageReceiver.Setup(x => x.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); + A.CallTo(() => _messageReceiver.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); Message[] result = _azureServiceBusConsumer.Receive(400); - _nameSpaceManagerWrapper.Verify(f => f.CreateSubscription("topic", "subscription", _subConfig)); + A.CallTo(() => _nameSpaceManagerWrapper.CreateSubscription("topic", "subscription", _subConfig)).MustHaveHappened(); Assert.Equal("somebody", result[0].Body.Value); } @@ -226,7 +228,7 @@ public void When_dispose_is_called_the_close_method_is_called() { _azureServiceBusConsumer.Dispose(); - _messageReceiver.Verify(x => x.Close(), Times.Once); + A.CallTo(() => _messageReceiver.Close()).MustHaveHappened(1, Times.Exactly); } [Fact] @@ -239,7 +241,7 @@ public void When_requeue_is_called_and_the_delay_is_zero_the_send_method_is_call _azureServiceBusConsumer.Requeue(message, 0); - _mockMessageProducer.Verify(x => x.Send(message), Times.Once); + A.CallTo(() => _mockMessageProducer.Send(message)).MustHaveHappened(1, Times.Exactly); } [Fact] @@ -252,14 +254,14 @@ public void When_requeue_is_called_and_the_delay_is_more_than_zero_the_sendWithD _azureServiceBusConsumer.Requeue(message, 100); - _mockMessageProducer.Verify(x => x.SendWithDelay(message, 100), Times.Once); + A.CallTo(() => _mockMessageProducer.SendWithDelay(message, 100)).MustHaveHappened(1, Times.Exactly); } [Fact] public void When_there_is_an_error_talking_to_servicebus_when_checking_if_subscription_exist_then_a_ChannelFailureException_is_raised() { - _nameSpaceManagerWrapper.Setup(f => f.SubscriptionExists("topic", "subscription")).Throws(new Exception()); + A.CallTo(() => _nameSpaceManagerWrapper.SubscriptionExists("topic", "subscription")).Throws(new Exception()); Assert.Throws(() => _azureServiceBusConsumer.Receive(400)); } @@ -267,22 +269,25 @@ public void [Fact] public void When_there_is_an_error_talking_to_servicebus_when_creating_the_subscription_then_a_ChannelFailureException_is_raised_and_ManagementClientWrapper_is_reinitilised() { - _nameSpaceManagerWrapper.Setup(f => f.SubscriptionExists("topic", "subscription")).Returns(false); - _nameSpaceManagerWrapper.Setup(f => f.CreateSubscription("topic", "subscription", _subConfig)).Throws(new Exception()); + A.CallTo(() => _nameSpaceManagerWrapper.SubscriptionExists("topic", "subscription")).Returns(false); + A.CallTo(() => _nameSpaceManagerWrapper.CreateSubscription("topic", "subscription", _subConfig)).Throws(new Exception()); Assert.Throws(() => _azureServiceBusConsumer.Receive(400)); - _nameSpaceManagerWrapper.Verify(managementClientWrapper => managementClientWrapper.Reset(), Times.Once); + A.CallTo(() => _nameSpaceManagerWrapper.Reset()).MustHaveHappenedOnceExactly(); } + /// + /// TODO: review + /// [Fact] public void When_there_is_an_error_talking_to_servicebus_when_receiving_then_a_ChannelFailureException_is_raised_and_the_messageReceiver_is_recreated() { - _nameSpaceManagerWrapper.Setup(f => f.SubscriptionExists("topic", "subscription")).Returns(true); + A.CallTo(() => _nameSpaceManagerWrapper.SubscriptionExists("topic", "subscription")).Returns(true); - _messageReceiver.Setup(f => f.Receive(It.IsAny(), It.IsAny())).Throws(new Exception()); + A.CallTo(() => _messageReceiver.Receive(A.Ignored, A.Ignored)).Throws(); Assert.Throws(() => _azureServiceBusConsumer.Receive(400)); - _mockMessageReceiver.Verify(x => x.Get(It.IsAny(), It.IsAny(), It.IsAny(), false), Times.Exactly(2)); + A.CallTo(() => _mockMessageReceiver.Get("topic", "subscription", ServiceBusReceiveMode.ReceiveAndDelete, false)).MustHaveHappened(2, Times.Exactly); } [Theory] @@ -290,63 +295,63 @@ public void When_there_is_an_error_talking_to_servicebus_when_receiving_then_a_C [InlineData(false)] public void Once_the_subscription_is_created_or_exits_it_does_not_check_if_it_exists_every_time(bool subscriptionExists) { - _nameSpaceManagerWrapper.Setup(f => f.SubscriptionExists("topic", "subscription")).Returns(subscriptionExists); + A.CallTo(() => _nameSpaceManagerWrapper.SubscriptionExists("topic", "subscription")).Returns(subscriptionExists); var brokeredMessageList = new List(); - var message1 = new Mock(); - message1.Setup(m => m.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); - message1.Setup(m => m.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_EVENT" } }); - brokeredMessageList.Add(message1.Object); + var message1 = A.Fake(); + A.CallTo(() => message1.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); + A.CallTo(() => message1.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_EVENT" } }); + brokeredMessageList.Add(message1); - _messageReceiver.Setup(x => x.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); + A.CallTo(() => _messageReceiver.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); _azureServiceBusConsumer.Receive(400); _azureServiceBusConsumer.Receive(400); if (subscriptionExists == false) { - _nameSpaceManagerWrapper.Verify(f => f.CreateSubscription("topic", "subscription", _subConfig), Times.Once); + A.CallTo(() => _nameSpaceManagerWrapper.CreateSubscription("topic", "subscription", _subConfig)).MustHaveHappened(1, Times.Exactly); } - _nameSpaceManagerWrapper.Verify(f => f.SubscriptionExists("topic", "subscription"), Times.Once); + A.CallTo(() => _nameSpaceManagerWrapper.SubscriptionExists("topic", "subscription")).MustHaveHappened(1, Times.Exactly); } [Fact] public void When_MessagingEntityAlreadyExistsException_does_not_check_if_subscription_exists() { - _nameSpaceManagerWrapper.Setup(f => f.SubscriptionExists("topic", "subscription")).Returns(false); - _nameSpaceManagerWrapper.Setup(f => f.CreateSubscription("topic", "subscription", new AzureServiceBusSubscriptionConfiguration())) + A.CallTo(() => _nameSpaceManagerWrapper.SubscriptionExists("topic", "subscription")).Returns(false); + A.CallTo(() => _nameSpaceManagerWrapper.CreateSubscription("topic", "subscription", new AzureServiceBusSubscriptionConfiguration())) .Throws(new ServiceBusException("whatever", ServiceBusFailureReason.MessagingEntityAlreadyExists)); var brokeredMessageList = new List(); - var message1 = new Mock(); + var message1 = A.Fake(); - message1.Setup(m => m.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); - message1.Setup(m => m.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_EVENT" } }); - brokeredMessageList.Add(message1.Object); + A.CallTo(() => message1.MessageBodyValue).Returns(Encoding.UTF8.GetBytes("somebody")); + A.CallTo(() => message1.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_EVENT" } }); + brokeredMessageList.Add(message1); - _messageReceiver.Setup(x => x.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); + A.CallTo(() => _messageReceiver.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); Message[] result = _azureServiceBusConsumer.Receive(400); _azureServiceBusConsumer.Receive(400); - _nameSpaceManagerWrapper.Verify(f => f.CreateSubscription("topic", "subscription", _subConfig)); + A.CallTo(() => _nameSpaceManagerWrapper.CreateSubscription("topic", "subscription", _subConfig)).MustHaveHappened(); Assert.Equal("somebody", result[0].Body.Value); - _nameSpaceManagerWrapper.Verify(f => f.SubscriptionExists("topic", "subscription"), Times.Once); + A.CallTo(() => _nameSpaceManagerWrapper.SubscriptionExists("topic", "subscription")).MustHaveHappened(1, Times.Exactly); } [Fact] public void When_a_message_contains_a_null_body_message_is_still_processed() { var brokeredMessageList = new List(); - var message1 = new Mock(); + var message1 = A.Fake(); - message1.Setup(x => x.MessageBodyValue).Returns((byte[])null); - message1.Setup(m => m.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_EVENT" } }); + A.CallTo(() => message1.MessageBodyValue).Returns((byte[])null); + A.CallTo(() => message1.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_EVENT" } }); - brokeredMessageList.Add(message1.Object); + brokeredMessageList.Add(message1); - _messageReceiver.Setup(x => x.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); + A.CallTo(() => _messageReceiver.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); Message[] result = _azureServiceBusConsumer.Receive(400); @@ -356,8 +361,8 @@ public void When_a_message_contains_a_null_body_message_is_still_processed() [Fact] public void When_receiving_messages_and_the_receiver_is_closing_a_MT_QUIT_message_is_sent() { - _messageReceiver.Setup(x => x.IsClosedOrClosing).Returns(true); - _messageReceiver.Setup(x => x.Receive(10, TimeSpan.FromMilliseconds(400))).Throws(new Exception("Closing")); + A.CallTo(() => _messageReceiver.IsClosedOrClosing).Returns(true); + A.CallTo(() => _messageReceiver.Receive(10, TimeSpan.FromMilliseconds(400))).Throws(new Exception("Closing")); Message[] result = _azureServiceBusConsumer.Receive(400); @@ -368,10 +373,10 @@ public void When_receiving_messages_and_the_receiver_is_closing_a_MT_QUIT_messag [Fact] public void When_a_subscription_does_not_exist_and_Missing_is_set_to_Validate_a_Channel_Failure_is_Raised() { - _nameSpaceManagerWrapper.Setup(f => f.SubscriptionExists("topic", "subscription")).Returns(false); + A.CallTo(() => _nameSpaceManagerWrapper.SubscriptionExists("topic", "subscription")).Returns(false); - var azureServiceBusConsumerValidate = new AzureServiceBusConsumer("topic", "subscription", _mockMessageProducer.Object, - _nameSpaceManagerWrapper.Object, _mockMessageReceiver.Object, makeChannels: OnMissingChannel.Validate); + var azureServiceBusConsumerValidate = new AzureServiceBusConsumer("topic", "subscription", _mockMessageProducer, + _nameSpaceManagerWrapper, _mockMessageReceiver, makeChannels: OnMissingChannel.Validate); Assert.Throws(() => azureServiceBusConsumerValidate.Receive(400)); } @@ -380,24 +385,24 @@ public void When_a_subscription_does_not_exist_and_Missing_is_set_to_Validate_a_ public void When_ackOnRead_is_Set_and_ack_fails_then_exception_is_thrown() { var brokeredMessageList = new List(); - var message1 = new Mock(); - var mockMessageReceiver = new Mock(); + var message1 = A.Fake(); + var mockMessageReceiver = A.Fake(); - mockMessageReceiver.Setup(x => x.Get("topic", "subscription", ServiceBusReceiveMode.PeekLock, false)).Returns(_messageReceiver.Object); + A.CallTo(() => mockMessageReceiver.Get("topic", "subscription", ServiceBusReceiveMode.PeekLock, false)).Returns(_messageReceiver); var lockToken = Guid.NewGuid().ToString(); - message1.Setup(x => x.MessageBodyValue).Returns((byte[])null); - message1.Setup(m => m.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_EVENT" } }); - message1.Setup(m => m.LockToken).Returns(lockToken); + A.CallTo(() => message1.MessageBodyValue).Returns((byte[])null); + A.CallTo(() => message1.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_EVENT" } }); + A.CallTo(() => message1.LockToken).Returns(lockToken); - brokeredMessageList.Add(message1.Object); + brokeredMessageList.Add(message1); - _messageReceiver.Setup(x => x.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); - _messageReceiver.Setup(x => x.Complete(lockToken)).Throws(new Exception()); + A.CallTo(() => _messageReceiver.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); + A.CallTo(() => _messageReceiver.Complete(lockToken)).Throws(new Exception()); - var azureServiceBusConsumer = new AzureServiceBusConsumer("topic", "subscription", _mockMessageProducer.Object, - _nameSpaceManagerWrapper.Object, mockMessageReceiver.Object, makeChannels: OnMissingChannel.Create, receiveMode: ServiceBusReceiveMode.PeekLock); + var azureServiceBusConsumer = new AzureServiceBusConsumer("topic", "subscription", _mockMessageProducer, + _nameSpaceManagerWrapper, mockMessageReceiver, makeChannels: OnMissingChannel.Create, receiveMode: ServiceBusReceiveMode.PeekLock); Message[] result = azureServiceBusConsumer.Receive(400); @@ -410,24 +415,24 @@ public void When_ackOnRead_is_Set_and_ack_fails_then_exception_is_thrown() public void When_ackOnRead_is_Set_and_DeadLetter_fails_then_exception_is_thrown() { var brokeredMessageList = new List(); - var message1 = new Mock(); - var mockMessageReceiver = new Mock(); + var message1 = A.Fake(); + var mockMessageReceiver = A.Fake(); - mockMessageReceiver.Setup(x => x.Get("topic", "subscription", ServiceBusReceiveMode.PeekLock, false)).Returns(_messageReceiver.Object); + A.CallTo(() => mockMessageReceiver.Get("topic", "subscription", ServiceBusReceiveMode.PeekLock, false)).Returns(_messageReceiver); var lockToken = Guid.NewGuid().ToString(); - message1.Setup(x => x.MessageBodyValue).Returns((byte[])null); - message1.Setup(m => m.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_EVENT" } }); - message1.Setup(m => m.LockToken).Returns(lockToken); + A.CallTo(() => message1.MessageBodyValue).Returns((byte[])null); + A.CallTo(() => message1.ApplicationProperties).Returns(new Dictionary { { "MessageType", "MT_EVENT" } }); + A.CallTo(() => message1.LockToken).Returns(lockToken); - brokeredMessageList.Add(message1.Object); + brokeredMessageList.Add(message1); - _messageReceiver.Setup(x => x.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); - _messageReceiver.Setup(x => x.DeadLetter(lockToken)).Throws(new Exception()); + A.CallTo(() => _messageReceiver.Receive(10, TimeSpan.FromMilliseconds(400))).Returns(Task.FromResult>(brokeredMessageList)); + A.CallTo(() => _messageReceiver.DeadLetter(lockToken)).Throws(new Exception()); - var azureServiceBusConsumer = new AzureServiceBusConsumer("topic", "subscription", _mockMessageProducer.Object, - _nameSpaceManagerWrapper.Object, mockMessageReceiver.Object, makeChannels: OnMissingChannel.Create, receiveMode: ServiceBusReceiveMode.PeekLock); + var azureServiceBusConsumer = new AzureServiceBusConsumer("topic", "subscription", _mockMessageProducer, + _nameSpaceManagerWrapper, mockMessageReceiver, makeChannels: OnMissingChannel.Create, receiveMode: ServiceBusReceiveMode.PeekLock); Message[] result = azureServiceBusConsumer.Receive(400); diff --git a/tests/Paramore.Brighter.AzureServiceBus.Tests/AzureServiceBusMessageProducerTests.cs b/tests/Paramore.Brighter.AzureServiceBus.Tests/AzureServiceBusMessageProducerTests.cs index 3abcbbeae0..db387b6c9f 100644 --- a/tests/Paramore.Brighter.AzureServiceBus.Tests/AzureServiceBusMessageProducerTests.cs +++ b/tests/Paramore.Brighter.AzureServiceBus.Tests/AzureServiceBusMessageProducerTests.cs @@ -1,8 +1,9 @@ using System; using System.Text; using System.Threading; +using System.Threading.Tasks; using Azure.Messaging.ServiceBus; -using Moq; +using FakeItEasy; using Paramore.Brighter.MessagingGateway.AzureServiceBus; using Paramore.Brighter.MessagingGateway.AzureServiceBus.AzureServiceBusWrappers; using Xunit; @@ -11,18 +12,18 @@ namespace Paramore.Brighter.AzureServiceBus.Tests { public class AzureServiceBusMessageProducerTests { - private readonly Mock _nameSpaceManagerWrapper; - private readonly Mock _topicClientProvider; - private readonly Mock _topicClient; + private readonly IAdministrationClientWrapper _nameSpaceManagerWrapper; + private readonly IServiceBusSenderProvider _topicClientProvider; + private readonly IServiceBusSenderWrapper _topicClient; private readonly AzureServiceBusMessageProducer _producer; public AzureServiceBusMessageProducerTests() { - _nameSpaceManagerWrapper = new Mock(); - _topicClientProvider = new Mock(); - _topicClient = new Mock(); + _nameSpaceManagerWrapper = A.Fake(); + _topicClientProvider = A.Fake(); + _topicClient = A.Fake(); - _producer = new AzureServiceBusMessageProducer(_nameSpaceManagerWrapper.Object, _topicClientProvider.Object, OnMissingChannel.Create); + _producer = new AzureServiceBusMessageProducer(_nameSpaceManagerWrapper, _topicClientProvider, OnMissingChannel.Create); } [Fact] @@ -31,16 +32,15 @@ public void When_the_topic_exists_and_sending_a_message_with_no_delay_it_should_ ServiceBusMessage sentMessage = null; var messageBody = Encoding.UTF8.GetBytes("A message body"); - _nameSpaceManagerWrapper.Setup(t => t.TopicExists("topic")).Returns(true); - _topicClientProvider.Setup(f => f.Get("topic")).Returns(_topicClient.Object); - _topicClient.Setup(f => f.SendAsync(It.IsAny(), CancellationToken.None)) - .Callback((ServiceBusMessage g, CancellationToken ct) => sentMessage = g); + A.CallTo(() => _nameSpaceManagerWrapper.TopicExists("topic")).Returns(true); + A.CallTo(() => _topicClientProvider.Get("topic")).Returns(_topicClient); + A.CallTo(() => _topicClient.SendAsync(A.Ignored, CancellationToken.None)).ReturnsLazily((ServiceBusMessage g, CancellationToken ct) => Task.FromResult(sentMessage = g)); _producer.Send(new Message(new MessageHeader(Guid.NewGuid(), "topic", MessageType.MT_EVENT), new MessageBody(messageBody, "JSON"))); Assert.Equal(messageBody, sentMessage.Body.ToArray()); Assert.Equal("MT_EVENT", sentMessage.ApplicationProperties["MessageType"]); - _topicClient.Verify(x => x.CloseAsync(), Times.Once); + A.CallTo(() => _topicClient.CloseAsync()).MustHaveHappenedOnceExactly(); } [Fact] @@ -49,16 +49,15 @@ public void When_sending_a_command_message_type_message_with_no_delay_it_should_ ServiceBusMessage sentMessage = null; var messageBody = Encoding.UTF8.GetBytes("A message body"); - _nameSpaceManagerWrapper.Setup(t => t.TopicExists("topic")).Returns(true); - _topicClientProvider.Setup(f => f.Get("topic")).Returns(_topicClient.Object); - _topicClient.Setup(f => f.SendAsync(It.IsAny(), CancellationToken.None)) - .Callback((ServiceBusMessage g, CancellationToken ct) => sentMessage = g); + A.CallTo(() => _nameSpaceManagerWrapper.TopicExists("topic")).Returns(true); + A.CallTo(() => _topicClientProvider.Get("topic")).Returns(_topicClient); + A.CallTo(() => _topicClient.SendAsync(A.Ignored, CancellationToken.None)).ReturnsLazily((ServiceBusMessage g, CancellationToken ct) => Task.FromResult(sentMessage = g)); _producer.Send(new Message(new MessageHeader(Guid.NewGuid(), "topic", MessageType.MT_COMMAND), new MessageBody(messageBody, "JSON"))); Assert.Equal(messageBody, sentMessage.Body.ToArray()); Assert.Equal("MT_COMMAND", sentMessage.ApplicationProperties["MessageType"]); - _topicClient.Verify(x => x.CloseAsync(), Times.Once); + A.CallTo(() => _topicClient.CloseAsync()).MustHaveHappenedOnceExactly(); } [Fact] @@ -67,23 +66,23 @@ public void When_the_topic_does_not_exist_it_should_be_created_and_the_message_i ServiceBusMessage sentMessage = null; var messageBody = Encoding.UTF8.GetBytes("A message body"); - _nameSpaceManagerWrapper.Setup(t => t.TopicExists("topic")).Returns(false); - _topicClientProvider.Setup(f => f.Get("topic")).Returns(_topicClient.Object); - _topicClient.Setup(f => f.SendAsync(It.IsAny(), CancellationToken.None)).Callback((ServiceBusMessage g, CancellationToken ct) => sentMessage = g); + A.CallTo(() => _nameSpaceManagerWrapper.TopicExists("topic")).Returns(false); + A.CallTo(() => _topicClientProvider.Get("topic")).Returns(_topicClient); + A.CallTo(() => _topicClient.SendAsync(A.Ignored, CancellationToken.None)).ReturnsLazily((ServiceBusMessage g, CancellationToken ct) => Task.FromResult(sentMessage = g)); _producer.Send(new Message(new MessageHeader(Guid.NewGuid(), "topic", MessageType.MT_NONE), new MessageBody(messageBody, "JSON"))); - _nameSpaceManagerWrapper.Verify(x => x.CreateTopic("topic", null), Times.Once); + A.CallTo(() => _nameSpaceManagerWrapper.CreateTopic("topic", null)).MustHaveHappenedOnceExactly(); Assert.Equal(messageBody, sentMessage.Body.ToArray()); } [Fact] public void When_a_message_is_send_and_an_exception_occurs_close_is_still_called() { - _nameSpaceManagerWrapper.Setup(t => t.TopicExists("topic")).Returns(true); - _topicClientProvider.Setup(f => f.Get("topic")).Returns(_topicClient.Object); + A.CallTo(() => _nameSpaceManagerWrapper.TopicExists("topic")).Returns(true); + A.CallTo(() => _topicClientProvider.Get("topic")).Returns(_topicClient); - _topicClient.Setup(x => x.SendAsync(It.IsAny(), CancellationToken.None)).Throws(new Exception("Failed")); + A.CallTo(() => _topicClient.SendAsync(A.Ignored, CancellationToken.None)).Throws(new Exception("Failed")); try { @@ -94,27 +93,30 @@ public void When_a_message_is_send_and_an_exception_occurs_close_is_still_called // ignored } - _topicClient.Verify(x => x.CloseAsync(), Times.Once); + A.CallTo(() => _topicClient.CloseAsync()).MustHaveHappenedOnceExactly(); } [Fact] - public void When_the_topic_exists_and_sending_a_message_with_a_delay_it_should_send_the_message_to_the_correct_topicclient() + public void + When_the_topic_exists_and_sending_a_message_with_a_delay_it_should_send_the_message_to_the_correct_topicclient() { ServiceBusMessage sentMessage = null; var messageBody = Encoding.UTF8.GetBytes("A message body"); - _nameSpaceManagerWrapper.Setup(t => t.TopicExists("topic")).Returns(true); - _topicClientProvider.Setup(f => f.Get("topic")).Returns(_topicClient.Object); - _topicClient - .Setup(f => f.ScheduleMessageAsync(It.IsAny(), It.IsAny(), - CancellationToken.None)).Callback((ServiceBusMessage g, DateTimeOffset d, CancellationToken ct) => - sentMessage = g); + A.CallTo(() => _nameSpaceManagerWrapper.TopicExists("topic")).Returns(true); + A.CallTo(() => _topicClientProvider.Get("topic")).Returns(_topicClient); - _producer.SendWithDelay(new Message(new MessageHeader(Guid.NewGuid(), "topic", MessageType.MT_EVENT), new MessageBody(messageBody, "JSON")), 1); + A.CallTo(() => _topicClient.ScheduleMessageAsync(A.Ignored, A.Ignored, + CancellationToken.None)).ReturnsLazily((ServiceBusMessage g, DateTimeOffset t, CancellationToken ct) => + Task.FromResult(sentMessage = g)); + + _producer.SendWithDelay( + new Message(new MessageHeader(Guid.NewGuid(), "topic", MessageType.MT_EVENT), + new MessageBody(messageBody, "JSON")), 1); Assert.Equal(messageBody, sentMessage.Body.ToArray()); Assert.Equal("MT_EVENT", sentMessage.ApplicationProperties["MessageType"]); - _topicClient.Verify(x => x.CloseAsync(), Times.Once); + A.CallTo(() => _topicClient.CloseAsync()).MustHaveHappenedOnceExactly(); } [Fact] @@ -123,18 +125,17 @@ public void When_sending_a_command_message_type_message_with_delay_it_should_set ServiceBusMessage sentMessage = null; var messageBody = Encoding.UTF8.GetBytes("A message body"); - _nameSpaceManagerWrapper.Setup(t => t.TopicExists("topic")).Returns(true); - _topicClientProvider.Setup(f => f.Get("topic")).Returns(_topicClient.Object); - _topicClient - .Setup(f => f.ScheduleMessageAsync(It.IsAny(), It.IsAny(), - CancellationToken.None)).Callback((ServiceBusMessage g, DateTimeOffset d, CancellationToken ct) => - sentMessage = g); + A.CallTo(() => _nameSpaceManagerWrapper.TopicExists("topic")).Returns(true); + A.CallTo(() => _topicClientProvider.Get("topic")).Returns(_topicClient); + + A.CallTo(() => _topicClient.ScheduleMessageAsync(A.Ignored, A.Ignored, + CancellationToken.None)).ReturnsLazily((ServiceBusMessage g, DateTimeOffset t, CancellationToken ct) => Task.FromResult(sentMessage = g)); _producer.SendWithDelay(new Message(new MessageHeader(Guid.NewGuid(), "topic", MessageType.MT_COMMAND), new MessageBody(messageBody, "JSON")), 1); Assert.Equal(messageBody, sentMessage.Body.ToArray()); Assert.Equal("MT_COMMAND", sentMessage.ApplicationProperties["MessageType"]); - _topicClient.Verify(x => x.CloseAsync(), Times.Once); + A.CallTo(() => _topicClient.CloseAsync()).MustHaveHappenedOnceExactly(); } [Fact] @@ -143,18 +144,17 @@ public void When_the_topic_does_not_exist_and_sending_a_message_with_a_delay_it_ ServiceBusMessage sentMessage = null; var messageBody = Encoding.UTF8.GetBytes("A message body"); - _nameSpaceManagerWrapper.Setup(t => t.TopicExists("topic")).Returns(false); - _topicClientProvider.Setup(f => f.Get("topic")).Returns(_topicClient.Object); - _topicClient - .Setup(f => f.ScheduleMessageAsync(It.IsAny(), It.IsAny(), - CancellationToken.None)).Callback((ServiceBusMessage g, DateTimeOffset d, CancellationToken ct) => - sentMessage = g); + A.CallTo(() => _nameSpaceManagerWrapper.TopicExists("topic")).Returns(false); + A.CallTo(() => _topicClientProvider.Get("topic")).Returns(_topicClient); + + A.CallTo(() => _topicClient.ScheduleMessageAsync(A.Ignored, A.Ignored, + CancellationToken.None)).ReturnsLazily((ServiceBusMessage g, DateTimeOffset t , CancellationToken ct) => Task.FromResult(sentMessage = g)); _producer.SendWithDelay(new Message(new MessageHeader(Guid.NewGuid(), "topic", MessageType.MT_NONE), new MessageBody(messageBody, "JSON")), 1); - _nameSpaceManagerWrapper.Verify(x => x.CreateTopic("topic", null), Times.Once); + A.CallTo(() => _nameSpaceManagerWrapper.CreateTopic("topic", null)).MustHaveHappenedOnceExactly(); Assert.Equal(messageBody, sentMessage.Body.ToArray()); - _topicClient.Verify(x => x.CloseAsync(), Times.Once); + A.CallTo(() => _topicClient.CloseAsync()).MustHaveHappenedOnceExactly(); } [Theory] @@ -164,19 +164,18 @@ public void Once_the_topic_is_created_it_then_does_not_check_if_it_exists_every_ { var messageBody = Encoding.UTF8.GetBytes("A message body"); - _nameSpaceManagerWrapper.Setup(t => t.TopicExists("topic")).Returns(topicExists); - _topicClientProvider.Setup(f => f.Get("topic")).Returns(_topicClient.Object); - _topicClient.Setup(f => f.ScheduleMessage(It.IsAny(), It.IsAny())).Callback((ServiceBusMessage g, DateTimeOffset d) => { }); + A.CallTo(() => _nameSpaceManagerWrapper.TopicExists("topic")).Returns(topicExists); + A.CallTo(() => _topicClientProvider.Get("topic")).Returns(_topicClient); _producer.SendWithDelay(new Message(new MessageHeader(Guid.NewGuid(), "topic", MessageType.MT_NONE), new MessageBody(messageBody, "JSON")), 1); _producer.SendWithDelay(new Message(new MessageHeader(Guid.NewGuid(), "topic", MessageType.MT_NONE), new MessageBody(messageBody, "JSON")), 1); if (topicExists == false) { - _nameSpaceManagerWrapper.Verify(x => x.CreateTopic("topic", null), Times.Once); + A.CallTo(() => _nameSpaceManagerWrapper.CreateTopic("topic", null)).MustHaveHappenedOnceExactly(); } - _nameSpaceManagerWrapper.Verify(x => x.TopicExists("topic"), Times.Once); + A.CallTo(() => _nameSpaceManagerWrapper.TopicExists("topic")).MustHaveHappenedOnceExactly(); } [Fact] @@ -184,10 +183,10 @@ public void When_there_is_an_error_talking_to_servicebus_when_creating_the_topic { var messageBody = Encoding.UTF8.GetBytes("A message body"); - _nameSpaceManagerWrapper.Setup(t => t.TopicExists("topic")).Throws(new Exception()); + A.CallTo(() => _nameSpaceManagerWrapper.TopicExists("topic")).Throws(new Exception()); Assert.ThrowsAsync(() => _producer.SendWithDelayAsync(new Message(new MessageHeader(Guid.NewGuid(), "topic", MessageType.MT_NONE), new MessageBody(messageBody, "JSON")), 1)); - _nameSpaceManagerWrapper.Verify(managementClientWrapper => managementClientWrapper.Reset(), Times.Once); + A.CallTo(() => _nameSpaceManagerWrapper.Reset()).MustHaveHappenedOnceExactly(); } @@ -196,15 +195,13 @@ public void When_there_is_an_error_getting_a_topic_client_the_connection_for_top { var messageBody = Encoding.UTF8.GetBytes("A message body"); - _nameSpaceManagerWrapper.Setup(t => t.TopicExists("topic")).Returns(true); + A.CallTo(() => _nameSpaceManagerWrapper.TopicExists("topic")).Returns(true); - _topicClientProvider.SetupSequence(f => f.Get("topic")) - .Throws(new Exception()) - .Returns(_topicClient.Object); + A.CallTo(() => _topicClientProvider.Get("topic")).Throws(new Exception()).Once().Then.Returns(_topicClient); - _producer.SendWithDelay(new Message(new MessageHeader(Guid.NewGuid(), "topic", MessageType.MT_NONE), new MessageBody(messageBody, "JSON"))); + _producer.SendWithDelay(new Message(new MessageHeader(Guid.NewGuid(), "topic", MessageType.MT_NONE), new MessageBody(messageBody, "JSON"))); - _topicClient.Verify(topicClient => topicClient.SendAsync(It.IsAny(), CancellationToken.None), Times.Once); + A.CallTo(() => _topicClient.SendAsync(A.Ignored, CancellationToken.None)).MustHaveHappenedOnceExactly(); } [Fact] @@ -212,7 +209,7 @@ public void When_the_topic_does_not_exist_and_Missing_is_set_to_Validate_an_exce { var messageBody = Encoding.UTF8.GetBytes("A message body"); - var producerValidate = new AzureServiceBusMessageProducer(_nameSpaceManagerWrapper.Object, _topicClientProvider.Object, OnMissingChannel.Validate); + var producerValidate = new AzureServiceBusMessageProducer(_nameSpaceManagerWrapper, _topicClientProvider, OnMissingChannel.Validate); Assert.ThrowsAsync(() => producerValidate.SendAsync(new Message(new MessageHeader(Guid.NewGuid(), "topic", MessageType.MT_NONE), new MessageBody(messageBody, "JSON")))); } diff --git a/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj b/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj index f108a41a51..3cacfe9ed4 100644 --- a/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj +++ b/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj @@ -7,9 +7,13 @@ + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - runtime; build; native; contentfiles; analyzers; buildtransitive From 12ccc16ea281cf95ff123d1bdc8150834aa24f27 Mon Sep 17 00:00:00 2001 From: Paul Reardon Date: Fri, 11 Aug 2023 07:38:17 +0100 Subject: [PATCH 08/41] Remove Logging of Body from Message Pump (#2776) --- src/Paramore.Brighter.ServiceActivator/MessagePump.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Paramore.Brighter.ServiceActivator/MessagePump.cs b/src/Paramore.Brighter.ServiceActivator/MessagePump.cs index eca54350b8..6933af14a7 100644 --- a/src/Paramore.Brighter.ServiceActivator/MessagePump.cs +++ b/src/Paramore.Brighter.ServiceActivator/MessagePump.cs @@ -310,16 +310,14 @@ private bool RequeueMessage(Message message) var originalMessageId = message.Header.Bag.TryGetValue(Message.OriginalMessageIdHeaderName, out object value) ? value.ToString() : null; s_logger.LogError( - "MessagePump: Have tried {RequeueCount} times to handle this message {Id}{OriginalMessageId} from {ChannelName} on thread # {ManagementThreadId}, dropping message.{5}Message Body:{Request}", + "MessagePump: Have tried {RequeueCount} times to handle this message {Id}{OriginalMessageId} from {ChannelName} on thread # {ManagementThreadId}, dropping message.", RequeueCount, message.Id, string.IsNullOrEmpty(originalMessageId) ? string.Empty : $" (original message id {originalMessageId})", Channel.Name, - Thread.CurrentThread.ManagedThreadId, - Environment.NewLine, - message.Body.Value); + Thread.CurrentThread.ManagedThreadId); RejectMessage(message); return false; From f0b1a9ac24db38ff3dfbf01b8847067eae6c85bb Mon Sep 17 00:00:00 2001 From: Ian Cooper Date: Tue, 22 Aug 2023 09:14:59 +0200 Subject: [PATCH 09/41] patch tuesday --- samples/ASBTaskQueue/Greetings/Greetings.csproj | 2 +- .../GreetingsSender.Web/GreetingsSender.Web.csproj | 2 +- .../GreetingsPorts/GreetingsPorts.csproj | 2 +- .../SalutationAnalytics/SalutationAnalytics.csproj | 2 +- .../SalutationPorts/SalutationPorts.csproj | 2 +- .../GreetingsEntities/GreetingsEntities.csproj | 2 +- .../SalutationEntities/SalutationEntities.csproj | 2 +- .../SalutationAnalytics/SalutationAnalytics.csproj | 2 +- .../Salutations_SqliteMigrations.csproj | 2 +- .../Paramore.Brighter.DynamoDb.csproj | 2 +- .../Paramore.Brighter.Inbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.Inbox.Sqlite.csproj | 2 +- .../Paramore.Brighter.MessagingGateway.AWSSQS.csproj | 6 +++--- ....Brighter.MessagingGateway.AzureServiceBus.csproj | 4 ++-- .../Paramore.Brighter.MsSql.Azure.csproj | 2 +- ...aramore.Brighter.MsSql.EntityFrameworkCore.csproj | 12 ++++++------ ...aramore.Brighter.MySql.EntityFrameworkCore.csproj | 8 ++++---- .../Paramore.Brighter.Outbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.Outbox.Sqlite.csproj | 2 +- ...re.Brighter.PostgreSql.EntityFrameworkCore.csproj | 8 ++++---- ...er.ServiceActivator.Extensions.Diagnostics.csproj | 2 +- .../Paramore.Brighter.Sqlite.Dapper.csproj | 2 +- ...ramore.Brighter.Sqlite.EntityFrameworkCore.csproj | 12 ++++++------ .../Paramore.Brighter.Sqlite.csproj | 2 +- .../Paramore.Brighter.Tranformers.AWS.csproj | 4 ++-- .../Paramore.Brighter.AWS.Tests.csproj | 2 +- .../Paramore.Brighter.Azure.Tests.csproj | 4 ++-- .../Paramore.Brighter.AzureServiceBus.Tests.csproj | 2 +- .../Paramore.Brighter.Core.Tests.csproj | 2 +- .../Paramore.Brighter.DynamoDB.Tests.csproj | 2 +- .../Paramore.Brighter.EventStore.Tests.csproj | 2 +- .../Paramore.Brighter.Extensions.Tests.csproj | 2 +- .../Paramore.Brighter.InMemory.Tests.csproj | 2 +- .../Paramore.Brighter.Kafka.Tests.csproj | 2 +- .../Paramore.Brighter.MSSQL.Tests.csproj | 2 +- .../Paramore.Brighter.MySQL.Tests.csproj | 2 +- .../Paramore.Brighter.PostgresSQL.Tests.csproj | 2 +- .../Paramore.Brighter.RESTMS.Tests.csproj | 2 +- .../Paramore.Brighter.RMQ.Tests.csproj | 2 +- .../Paramore.Brighter.Redis.Tests.csproj | 2 +- .../Paramore.Brighter.Sqlite.Tests.csproj | 2 +- 41 files changed, 62 insertions(+), 62 deletions(-) diff --git a/samples/ASBTaskQueue/Greetings/Greetings.csproj b/samples/ASBTaskQueue/Greetings/Greetings.csproj index 1046acfaec..cbc85df188 100644 --- a/samples/ASBTaskQueue/Greetings/Greetings.csproj +++ b/samples/ASBTaskQueue/Greetings/Greetings.csproj @@ -13,7 +13,7 @@ - + diff --git a/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj b/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj index 4dbf88d95d..fbfd8663b6 100644 --- a/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj +++ b/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj @@ -14,7 +14,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/samples/WebAPI_Dapper/GreetingsPorts/GreetingsPorts.csproj b/samples/WebAPI_Dapper/GreetingsPorts/GreetingsPorts.csproj index e4ae98f96e..833ed911c8 100644 --- a/samples/WebAPI_Dapper/GreetingsPorts/GreetingsPorts.csproj +++ b/samples/WebAPI_Dapper/GreetingsPorts/GreetingsPorts.csproj @@ -12,7 +12,7 @@ - + diff --git a/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj b/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj index f4dda8e4fc..db170a8faf 100644 --- a/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj +++ b/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj @@ -23,7 +23,7 @@ - + diff --git a/samples/WebAPI_Dapper/SalutationPorts/SalutationPorts.csproj b/samples/WebAPI_Dapper/SalutationPorts/SalutationPorts.csproj index d32320a730..8b5a84a736 100644 --- a/samples/WebAPI_Dapper/SalutationPorts/SalutationPorts.csproj +++ b/samples/WebAPI_Dapper/SalutationPorts/SalutationPorts.csproj @@ -11,7 +11,7 @@ - + diff --git a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj index 6baf88b6b9..3668d4529a 100644 --- a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj +++ b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj index 665c88035d..30a5a5a08b 100644 --- a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj +++ b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj b/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj index 7a4fc635da..e3e46d706d 100644 --- a/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj +++ b/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj @@ -34,7 +34,7 @@ - + diff --git a/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj b/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj index 8eca44b33c..352821061a 100644 --- a/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj +++ b/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj index d14a31a016..ae3ae2e7c3 100644 --- a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj +++ b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj @@ -5,7 +5,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj index 0c807a1d9f..6944c7d7a8 100644 --- a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj b/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj index 7f1e806042..c37db12401 100644 --- a/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj +++ b/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj @@ -7,7 +7,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj index 8021a863e5..5ddb84bd54 100644 --- a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj +++ b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj @@ -9,11 +9,11 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/Paramore.Brighter.MessagingGateway.AzureServiceBus.csproj b/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/Paramore.Brighter.MessagingGateway.AzureServiceBus.csproj index 94bcc606f4..1897002fc8 100644 --- a/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/Paramore.Brighter.MessagingGateway.AzureServiceBus.csproj +++ b/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/Paramore.Brighter.MessagingGateway.AzureServiceBus.csproj @@ -7,8 +7,8 @@ 8.0 - - + + diff --git a/src/Paramore.Brighter.MsSql.Azure/Paramore.Brighter.MsSql.Azure.csproj b/src/Paramore.Brighter.MsSql.Azure/Paramore.Brighter.MsSql.Azure.csproj index 2dcbce6410..e485fe73c3 100644 --- a/src/Paramore.Brighter.MsSql.Azure/Paramore.Brighter.MsSql.Azure.csproj +++ b/src/Paramore.Brighter.MsSql.Azure/Paramore.Brighter.MsSql.Azure.csproj @@ -12,7 +12,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj b/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj index f105413e09..c05955cb06 100644 --- a/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj @@ -27,15 +27,15 @@ - - - + + + - - - + + + diff --git a/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj b/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj index 0bbdfb516c..abbaea6387 100644 --- a/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj @@ -19,15 +19,15 @@ - + - + - + - + diff --git a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj index 8d7fcb8397..9c089a051c 100644 --- a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj b/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj index a2f30923e6..085ed8f4d5 100644 --- a/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj +++ b/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj @@ -11,7 +11,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj b/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj index 99fa20cac8..aacd794cac 100644 --- a/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj @@ -23,13 +23,13 @@ - - + + - - + + diff --git a/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj b/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj index 80386f492d..e28e73c703 100644 --- a/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj +++ b/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj @@ -8,7 +8,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Sqlite.Dapper/Paramore.Brighter.Sqlite.Dapper.csproj b/src/Paramore.Brighter.Sqlite.Dapper/Paramore.Brighter.Sqlite.Dapper.csproj index b62aca203d..b8a92e2fc1 100644 --- a/src/Paramore.Brighter.Sqlite.Dapper/Paramore.Brighter.Sqlite.Dapper.csproj +++ b/src/Paramore.Brighter.Sqlite.Dapper/Paramore.Brighter.Sqlite.Dapper.csproj @@ -10,7 +10,7 @@ - + all diff --git a/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj b/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj index 691cbb58e6..f26c0ffd3e 100644 --- a/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj @@ -21,15 +21,15 @@ - - - + + + - - - + + + diff --git a/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj b/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj index e3fcc83bc1..f07c48fdcd 100644 --- a/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj +++ b/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj @@ -7,7 +7,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj index 9890e2db11..3ecae7b724 100644 --- a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj +++ b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj @@ -18,8 +18,8 @@ - - + + diff --git a/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj b/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj index 1c6f98125d..56b9f7e363 100644 --- a/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj +++ b/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj @@ -12,7 +12,7 @@ - + diff --git a/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj b/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj index 42089e6230..230cbf55c1 100644 --- a/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj +++ b/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj @@ -9,9 +9,9 @@ - + - + diff --git a/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj b/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj index 3cacfe9ed4..a47273f0be 100644 --- a/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj +++ b/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj @@ -13,7 +13,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj b/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj index 4569637c1e..b5077662c3 100644 --- a/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj +++ b/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj @@ -15,7 +15,7 @@ - + diff --git a/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj b/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj index ef0b139973..9d3a4e8605 100644 --- a/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj +++ b/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj @@ -12,7 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj b/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj index 3176bd09dd..4a5eda64e8 100644 --- a/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj +++ b/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj @@ -12,7 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj b/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj index 538edfbb10..7c8c2be3f7 100644 --- a/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj +++ b/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj b/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj index 8c6992c0e8..fd31a6fcca 100644 --- a/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj +++ b/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj b/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj index a4d8af1b09..77c0b391d7 100644 --- a/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj +++ b/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj @@ -12,7 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj b/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj index 18a3f7e29e..c72633145a 100644 --- a/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj +++ b/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj @@ -14,7 +14,7 @@ - + all diff --git a/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj b/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj index bf3b420b91..c655f71297 100644 --- a/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj +++ b/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj @@ -13,7 +13,7 @@ - + all diff --git a/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj b/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj index b0c8b59c8b..1edd1a84c1 100644 --- a/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj +++ b/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj @@ -13,7 +13,7 @@ - + all diff --git a/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj b/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj index 454b03961b..eb6cc712b4 100644 --- a/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj +++ b/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj b/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj index 3f85eca548..aa9cfc0e84 100644 --- a/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj +++ b/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj b/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj index f2bceaf6e9..05b916f7af 100644 --- a/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj +++ b/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj b/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj index 90a9865ab7..0ca90fac07 100644 --- a/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj +++ b/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all From c6686c257d0216b38143b2eb3a501ce82a112b2f Mon Sep 17 00:00:00 2001 From: iancooper Date: Mon, 28 Aug 2023 21:13:23 +0100 Subject: [PATCH 10/41] Patch Tuesday --- samples/ASBTaskQueue/Greetings/Greetings.csproj | 6 +++--- .../GreetingsEntities/GreetingsEntities.csproj | 2 +- .../SalutationEntities/SalutationEntities.csproj | 2 +- samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj | 2 +- .../WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj | 2 +- .../Paramore.Brighter.DynamoDb.csproj | 2 +- .../Paramore.Brighter.Inbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.MessagingGateway.AWSSQS.csproj | 6 +++--- .../Paramore.Brighter.Outbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.Tranformers.AWS.csproj | 4 ++-- .../Paramore.Brighter.AWS.Tests.csproj | 2 +- .../Paramore.Brighter.Azure.Tests.csproj | 2 +- .../Paramore.Brighter.AzureServiceBus.Tests.csproj | 2 +- .../Paramore.Brighter.Core.Tests.csproj | 2 +- .../Paramore.Brighter.DynamoDB.Tests.csproj | 2 +- .../Paramore.Brighter.EventStore.Tests.csproj | 2 +- .../Paramore.Brighter.Extensions.Tests.csproj | 2 +- .../Paramore.Brighter.InMemory.Tests.csproj | 2 +- .../Paramore.Brighter.Kafka.Tests.csproj | 2 +- .../Paramore.Brighter.MSSQL.Tests.csproj | 2 +- .../Paramore.Brighter.MySQL.Tests.csproj | 2 +- .../Paramore.Brighter.PostgresSQL.Tests.csproj | 2 +- .../Paramore.Brighter.RESTMS.Tests.csproj | 2 +- .../Paramore.Brighter.RMQ.Tests.csproj | 2 +- .../Paramore.Brighter.Redis.Tests.csproj | 2 +- .../Paramore.Brighter.Sqlite.Tests.csproj | 2 +- 26 files changed, 31 insertions(+), 31 deletions(-) diff --git a/samples/ASBTaskQueue/Greetings/Greetings.csproj b/samples/ASBTaskQueue/Greetings/Greetings.csproj index cbc85df188..f5d13e406f 100644 --- a/samples/ASBTaskQueue/Greetings/Greetings.csproj +++ b/samples/ASBTaskQueue/Greetings/Greetings.csproj @@ -14,9 +14,9 @@ - - - + + + diff --git a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj index 3668d4529a..04948aeef3 100644 --- a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj +++ b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj index 30a5a5a08b..fef5d082ec 100644 --- a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj +++ b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj b/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj index 12c2495571..f6d7addbc8 100644 --- a/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj +++ b/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj @@ -10,7 +10,7 @@ - + diff --git a/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj b/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj index 35830cab2e..12e35de2c3 100644 --- a/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj +++ b/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj index ae3ae2e7c3..21d9ab4f50 100644 --- a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj +++ b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj @@ -5,7 +5,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj index 6944c7d7a8..6194c446d5 100644 --- a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj index 5ddb84bd54..3ffc72afa2 100644 --- a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj +++ b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj @@ -9,11 +9,11 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj index 9c089a051c..f2b4ca7b62 100644 --- a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj index 3ecae7b724..dbb06d11d0 100644 --- a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj +++ b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj @@ -18,8 +18,8 @@ - - + + diff --git a/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj b/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj index 56b9f7e363..5d2778d5eb 100644 --- a/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj +++ b/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj @@ -10,7 +10,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj b/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj index 230cbf55c1..9b8adae34d 100644 --- a/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj +++ b/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj b/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj index a47273f0be..b92aea3dd6 100644 --- a/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj +++ b/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj @@ -12,7 +12,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj b/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj index b5077662c3..bfb60f4083 100644 --- a/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj +++ b/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj @@ -13,7 +13,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj b/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj index 9d3a4e8605..9744e9daba 100644 --- a/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj +++ b/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj @@ -11,7 +11,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj b/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj index 4a5eda64e8..fa53337579 100644 --- a/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj +++ b/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj @@ -11,7 +11,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj b/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj index 7c8c2be3f7..6b885cc5bb 100644 --- a/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj +++ b/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj @@ -7,7 +7,7 @@ - + diff --git a/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj b/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj index fd31a6fcca..d67ae696ba 100644 --- a/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj +++ b/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj @@ -10,7 +10,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj b/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj index 77c0b391d7..f039fd5d6a 100644 --- a/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj +++ b/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj @@ -11,7 +11,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj b/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj index c72633145a..3dededd881 100644 --- a/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj +++ b/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj @@ -11,7 +11,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj b/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj index c655f71297..46c90473f1 100644 --- a/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj +++ b/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj @@ -10,7 +10,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj b/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj index 1edd1a84c1..67be709177 100644 --- a/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj +++ b/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj @@ -10,7 +10,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj b/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj index eb6cc712b4..0f0df93a54 100644 --- a/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj +++ b/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj @@ -10,7 +10,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj b/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj index aa9cfc0e84..1a8b3a4d35 100644 --- a/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj +++ b/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj @@ -10,7 +10,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj b/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj index 05b916f7af..abfc15b4dc 100644 --- a/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj +++ b/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj @@ -10,7 +10,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj b/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj index 0ca90fac07..7e7fbcb150 100644 --- a/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj +++ b/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj @@ -10,7 +10,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + From da266956ad6c2aeff6580f7122ad3db2938d1306 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 14:03:51 +0100 Subject: [PATCH 11/41] chore(deps): bump dotnet-ef from 7.0.9 to 7.0.10 (#2779) Bumps [dotnet-ef](https://github.com/dotnet/efcore) from 7.0.9 to 7.0.10. - [Release notes](https://github.com/dotnet/efcore/releases) - [Commits](https://github.com/dotnet/efcore/compare/v7.0.9...v7.0.10) --- updated-dependencies: - dependency-name: dotnet-ef dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 2be6730d44..558293e1d9 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "dotnet-ef": { - "version": "7.0.9", + "version": "7.0.10", "commands": [ "dotnet-ef" ] From dec90bc99a238927d611144f1ce1af1068c28b22 Mon Sep 17 00:00:00 2001 From: Ian Cooper Date: Mon, 4 Sep 2023 20:34:51 +0100 Subject: [PATCH 12/41] Patch Tuesday --- .../GreetingsEntities/GreetingsEntities.csproj | 2 +- .../SalutationEntities/SalutationEntities.csproj | 2 +- .../Paramore.Brighter.DynamoDb.csproj | 2 +- .../Paramore.Brighter.Inbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.MessagingGateway.AWSSQS.csproj | 6 +++--- .../Paramore.Brighter.Outbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.Tranformers.AWS.csproj | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj index 04948aeef3..b5a625bb3b 100644 --- a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj +++ b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj index fef5d082ec..690b76f4c3 100644 --- a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj +++ b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj index 21d9ab4f50..48ac4e70f8 100644 --- a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj +++ b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj @@ -5,7 +5,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj index 6194c446d5..a62f511c81 100644 --- a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj index 3ffc72afa2..234e41706a 100644 --- a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj +++ b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj @@ -9,11 +9,11 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj index f2b4ca7b62..af96ae3ff9 100644 --- a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj index dbb06d11d0..e51d4f5b41 100644 --- a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj +++ b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj @@ -18,8 +18,8 @@ - - + + From 438938b365766c5152fd1f5f33eaa530c243dcb7 Mon Sep 17 00:00:00 2001 From: Ian Cooper Date: Mon, 4 Sep 2023 20:36:46 +0100 Subject: [PATCH 13/41] Patch Tuesday --- .../Paramore.Brighter.AWS.Tests.csproj | 2 +- .../Paramore.Brighter.Azure.Tests.csproj | 2 +- .../Paramore.Brighter.AzureServiceBus.Tests.csproj | 2 +- .../Paramore.Brighter.Core.Tests.csproj | 2 +- .../Paramore.Brighter.DynamoDB.Tests.csproj | 2 +- .../Paramore.Brighter.EventStore.Tests.csproj | 2 +- .../Paramore.Brighter.Extensions.Tests.csproj | 2 +- .../Paramore.Brighter.InMemory.Tests.csproj | 2 +- .../Paramore.Brighter.Kafka.Tests.csproj | 2 +- .../Paramore.Brighter.MSSQL.Tests.csproj | 2 +- .../Paramore.Brighter.MySQL.Tests.csproj | 2 +- .../Paramore.Brighter.PostgresSQL.Tests.csproj | 2 +- .../Paramore.Brighter.RESTMS.Tests.csproj | 2 +- .../Paramore.Brighter.RMQ.Tests.csproj | 2 +- .../Paramore.Brighter.Redis.Tests.csproj | 2 +- .../Paramore.Brighter.Sqlite.Tests.csproj | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj b/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj index 5d2778d5eb..6be58c8779 100644 --- a/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj +++ b/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj @@ -12,7 +12,7 @@ - + diff --git a/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj b/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj index 9b8adae34d..027111e97a 100644 --- a/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj +++ b/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj @@ -11,7 +11,7 @@ - + diff --git a/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj b/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj index b92aea3dd6..097dc708a5 100644 --- a/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj +++ b/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj @@ -13,7 +13,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj b/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj index bfb60f4083..8842e5a53d 100644 --- a/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj +++ b/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj @@ -15,7 +15,7 @@ - + diff --git a/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj b/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj index 9744e9daba..21a936c4cf 100644 --- a/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj +++ b/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj @@ -12,7 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj b/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj index fa53337579..c33f93ff7c 100644 --- a/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj +++ b/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj @@ -12,7 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj b/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj index 6b885cc5bb..cf55af6c66 100644 --- a/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj +++ b/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj b/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj index d67ae696ba..3bf4fa9b69 100644 --- a/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj +++ b/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj b/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj index f039fd5d6a..af94852cc0 100644 --- a/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj +++ b/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj @@ -12,7 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj b/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj index 3dededd881..772d05fc8c 100644 --- a/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj +++ b/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj @@ -14,7 +14,7 @@ - + all diff --git a/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj b/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj index 46c90473f1..5ebd178ace 100644 --- a/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj +++ b/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj @@ -13,7 +13,7 @@ - + all diff --git a/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj b/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj index 67be709177..0d0bec2d6c 100644 --- a/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj +++ b/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj @@ -13,7 +13,7 @@ - + all diff --git a/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj b/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj index 0f0df93a54..27da06d95a 100644 --- a/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj +++ b/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj b/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj index 1a8b3a4d35..a29b9d3b9d 100644 --- a/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj +++ b/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj b/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj index abfc15b4dc..c946744900 100644 --- a/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj +++ b/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj b/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj index 7e7fbcb150..067f2f479f 100644 --- a/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj +++ b/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all From ed035c6e1a3974bf0d564c95a2f5b4a7a8bea98c Mon Sep 17 00:00:00 2001 From: Paul Reardon Date: Mon, 4 Sep 2023 22:29:26 +0100 Subject: [PATCH 14/41] Add the ability to specify the tags you whish to place on archives messages (#2800) --- .../AzureBlobArchiveProvider.cs | 11 +---------- .../AzureBlobArchiveProviderOptions.cs | 12 ++++++++++++ .../AzureBlobArchiveProviderTests.cs | 11 +++++++++-- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/Paramore.Brighter.Archive.Azure/AzureBlobArchiveProvider.cs b/src/Paramore.Brighter.Archive.Azure/AzureBlobArchiveProvider.cs index 4cac9a3d25..21c45fa5bd 100644 --- a/src/Paramore.Brighter.Archive.Azure/AzureBlobArchiveProvider.cs +++ b/src/Paramore.Brighter.Archive.Azure/AzureBlobArchiveProvider.cs @@ -100,16 +100,7 @@ private BlobUploadOptions GetUploadOptions(Message message) }; if (_options.TagBlobs) - { - opts.Tags = new Dictionary() - { - { "topic", message.Header.Topic }, - { "correlationId", message.Header.CorrelationId.ToString() }, - { "message_type", message.Header.MessageType.ToString() }, - { "timestamp", message.Header.TimeStamp.ToString() }, - { "content_type", message.Header.ContentType } - }; - } + opts.Tags = _options.TagsFunc.Invoke(message); return opts; } diff --git a/src/Paramore.Brighter.Archive.Azure/AzureBlobArchiveProviderOptions.cs b/src/Paramore.Brighter.Archive.Azure/AzureBlobArchiveProviderOptions.cs index 81833f5b72..ff635cbc69 100644 --- a/src/Paramore.Brighter.Archive.Azure/AzureBlobArchiveProviderOptions.cs +++ b/src/Paramore.Brighter.Archive.Azure/AzureBlobArchiveProviderOptions.cs @@ -34,4 +34,16 @@ public class AzureBlobArchiveProviderOptions /// The maximum upload size in mb /// public int MaxUploadSize = 50; + + /// + /// The function to arrange the tags to add when storing, please note that must be True for these to be used + /// + public Func> TagsFunc = (message) => new Dictionary() + { + { "topic", message.Header.Topic }, + { "correlationId", message.Header.CorrelationId.ToString() }, + { "message_type", message.Header.MessageType.ToString() }, + { "timestamp", message.Header.TimeStamp.ToString() }, + { "content_type", message.Header.ContentType } + }; } diff --git a/tests/Paramore.Brighter.Azure.Tests/AzureBlobArchiveProviderTests.cs b/tests/Paramore.Brighter.Azure.Tests/AzureBlobArchiveProviderTests.cs index 2fa582794d..1f5b5bf18b 100644 --- a/tests/Paramore.Brighter.Azure.Tests/AzureBlobArchiveProviderTests.cs +++ b/tests/Paramore.Brighter.Azure.Tests/AzureBlobArchiveProviderTests.cs @@ -175,8 +175,15 @@ private BlobContainerClient GetClient(AccessTier tier , bool tags = false ) BlobContainerUri = new Uri("https://brighterarchivertest.blob.core.windows.net/messagearchive"), TokenCredential = new AzureCliCredential(), AccessTier = tier, - TagBlobs = tags - + TagBlobs = tags, + TagsFunc = (message => new Dictionary() + { + { "topic", message.Header.Topic }, + { "correlationId", message.Header.CorrelationId.ToString() }, + { "message_type", message.Header.MessageType.ToString() }, + { "timestamp", message.Header.TimeStamp.ToString() }, + { "content_type", message.Header.ContentType } + }) }; _provider = new AzureBlobArchiveProvider(options); From 17c645c06ccc263c1f8da2da9eb78378eb4887a1 Mon Sep 17 00:00:00 2001 From: Paul Reardon Date: Fri, 8 Sep 2023 07:54:26 +0100 Subject: [PATCH 15/41] Ensure that we do not MT_Quit on ASB Sessions (#2812) --- .../AzureServiceBusConsumer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/AzureServiceBusConsumer.cs b/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/AzureServiceBusConsumer.cs index facc63ec83..196b278e35 100644 --- a/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/AzureServiceBusConsumer.cs +++ b/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/AzureServiceBusConsumer.cs @@ -93,7 +93,7 @@ public Message[] Receive(int timeoutInMilliseconds) } catch (Exception e) { - if (_serviceBusReceiver is {IsClosedOrClosing: true}) + if (_serviceBusReceiver is {IsClosedOrClosing: true} && !_subscriptionConfiguration.RequireSession) { s_logger.LogDebug("Message Receiver is closing..."); var message = new Message(new MessageHeader(Guid.NewGuid(), _topicName, MessageType.MT_QUIT), new MessageBody(string.Empty)); From 33370dcbf4509133302d17ba2e21a40cc3864c1c Mon Sep 17 00:00:00 2001 From: Ian Cooper Date: Mon, 11 Sep 2023 20:13:42 +0100 Subject: [PATCH 16/41] Patch Tuesday --- samples/OpenTelemetry/Producer/Producer.csproj | 2 +- samples/OpenTelemetry/Sweeper/Sweeper.csproj | 4 ++-- .../GreetingsEntities/GreetingsEntities.csproj | 2 +- .../SalutationEntities/SalutationEntities.csproj | 2 +- .../Orders.Worker/Orders.Worker.csproj | 2 +- .../Paramore.Brighter.DynamoDb.csproj | 2 +- .../Paramore.Brighter.Inbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.MessagingGateway.AWSSQS.csproj | 6 +++--- .../Paramore.Brighter.Outbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.Tranformers.AWS.csproj | 4 ++-- .../Paramore.Brighter.Core.Tests.csproj | 4 ++-- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/samples/OpenTelemetry/Producer/Producer.csproj b/samples/OpenTelemetry/Producer/Producer.csproj index 66e7a708d9..e81f318545 100644 --- a/samples/OpenTelemetry/Producer/Producer.csproj +++ b/samples/OpenTelemetry/Producer/Producer.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/OpenTelemetry/Sweeper/Sweeper.csproj b/samples/OpenTelemetry/Sweeper/Sweeper.csproj index 6f2b15a587..ca18fd4a21 100644 --- a/samples/OpenTelemetry/Sweeper/Sweeper.csproj +++ b/samples/OpenTelemetry/Sweeper/Sweeper.csproj @@ -13,9 +13,9 @@ - + - + diff --git a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj index b5a625bb3b..5f2cba45f6 100644 --- a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj +++ b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj index 690b76f4c3..ce1b09cd2c 100644 --- a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj +++ b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebApiWithWorkerAndSweeper/Orders.Worker/Orders.Worker.csproj b/samples/WebApiWithWorkerAndSweeper/Orders.Worker/Orders.Worker.csproj index 3696611b5e..dbc54fefdc 100644 --- a/samples/WebApiWithWorkerAndSweeper/Orders.Worker/Orders.Worker.csproj +++ b/samples/WebApiWithWorkerAndSweeper/Orders.Worker/Orders.Worker.csproj @@ -7,7 +7,7 @@ - + diff --git a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj index 48ac4e70f8..899cd4d5c2 100644 --- a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj +++ b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj @@ -5,7 +5,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj index a62f511c81..36bd925a58 100644 --- a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj index 234e41706a..fdc26c3be7 100644 --- a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj +++ b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj @@ -9,11 +9,11 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj index af96ae3ff9..d7c7a4ff92 100644 --- a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj index e51d4f5b41..67decf2906 100644 --- a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj +++ b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj @@ -18,8 +18,8 @@ - - + + diff --git a/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj b/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj index 8842e5a53d..fa26173539 100644 --- a/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj +++ b/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj @@ -16,8 +16,8 @@ - - + + From 2d02bfb937d848f9dde1a52be8938edfd0663617 Mon Sep 17 00:00:00 2001 From: Ian Cooper Date: Thu, 21 Sep 2023 12:50:23 +0100 Subject: [PATCH 17/41] patch tuesday --- .../ASBTaskQueue/Greetings/Greetings.csproj | 8 ++++---- .../GreetingsSender.Web.csproj | 2 +- .../SalutationAnalytics.csproj | 2 +- .../GreetingsEntities/GreetingsEntities.csproj | 2 +- .../SalutationEntities.csproj | 2 +- .../GreetingsPorts/GreetingsPorts.csproj | 2 +- .../SalutationPorts/SalutationPorts.csproj | 2 +- .../Salutations_SqliteMigrations.csproj | 2 +- .../Paramore.Brighter.Archive.Azure.csproj | 2 +- .../Paramore.Brighter.DynamoDb.csproj | 2 +- .../Paramore.Brighter.Inbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.Inbox.Postgres.csproj | 2 +- .../Paramore.Brighter.Inbox.Sqlite.csproj | 2 +- ...ore.Brighter.MessagingGateway.AWSSQS.csproj | 6 +++--- ...ter.MessagingGateway.AzureServiceBus.csproj | 2 +- .../Paramore.Brighter.MsSql.Azure.csproj | 2 +- ...e.Brighter.MsSql.EntityFrameworkCore.csproj | 6 +++--- ...e.Brighter.MySql.EntityFrameworkCore.csproj | 4 ++-- .../Paramore.Brighter.Outbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.Outbox.PostgreSql.csproj | 2 +- .../Paramore.Brighter.Outbox.Sqlite.csproj | 2 +- ...ghter.PostgreSql.EntityFrameworkCore.csproj | 6 +++--- .../Paramore.Brighter.PostgreSql.csproj | 2 +- ...viceActivator.Extensions.Diagnostics.csproj | 2 +- ....Brighter.Sqlite.EntityFrameworkCore.csproj | 6 +++--- .../Paramore.Brighter.Sqlite.csproj | 2 +- .../Paramore.Brighter.Tranformers.AWS.csproj | 4 ++-- ...Paramore.Brighter.Transformers.Azure.csproj | 2 +- .../Paramore.Brighter.AWS.Tests.csproj | 4 ++-- .../Paramore.Brighter.Azure.Tests.csproj | 4 ++-- ...amore.Brighter.AzureServiceBus.Tests.csproj | 4 ++-- .../Claims/When_wrapping_a_large_message.cs | 2 +- ...y_Clearing_The_Outbox_A_Span_Is_Exported.cs | 4 ++-- ...ing_A_Command_With_A_Inbox_Enabled_Async.cs | 2 +- .../Paramore.Brighter.Core.Tests.csproj | 4 ++-- .../Paramore.Brighter.DynamoDB.Tests.csproj | 4 ++-- .../Paramore.Brighter.EventStore.Tests.csproj | 4 ++-- .../Paramore.Brighter.Extensions.Tests.csproj | 4 ++-- .../Inbox/When_expiring_messages_in_inbox.cs | 18 +++++++++--------- .../Outbox/When_controlling_cache_size.cs | 10 +++++----- .../Outbox/When_expiring_message_in_outbox.cs | 18 +++++++++--------- .../Paramore.Brighter.InMemory.Tests.csproj | 4 ++-- .../Sweeper/When_sweeping_the_outbox.cs | 10 +++++----- .../When_consumer_declares_topic.cs | 4 ++-- ...er_declares_topic_on_a_confluent_cluster.cs | 4 ++-- ...ets_awaiting_next_acknowledge_sweep_them.cs | 18 +++++++----------- ...posting_a_message_to_a_confluent_cluster.cs | 4 ++-- .../Paramore.Brighter.Kafka.Tests.csproj | 4 ++-- .../Paramore.Brighter.MSSQL.Tests.csproj | 4 ++-- .../Paramore.Brighter.MySQL.Tests.csproj | 4 ++-- .../Paramore.Brighter.PostgresSQL.Tests.csproj | 4 ++-- .../Paramore.Brighter.RESTMS.Tests.csproj | 4 ++-- ...etry_limits_force_a_message_onto_the_DLQ.cs | 10 +++++----- .../When_ttl_causes_a_message_to_expire.cs | 4 ++-- .../Paramore.Brighter.RMQ.Tests.csproj | 4 ++-- .../Paramore.Brighter.Redis.Tests.csproj | 4 ++-- .../Paramore.Brighter.Sqlite.Tests.csproj | 4 ++-- 57 files changed, 125 insertions(+), 129 deletions(-) diff --git a/samples/ASBTaskQueue/Greetings/Greetings.csproj b/samples/ASBTaskQueue/Greetings/Greetings.csproj index f5d13e406f..ed14f1a1b0 100644 --- a/samples/ASBTaskQueue/Greetings/Greetings.csproj +++ b/samples/ASBTaskQueue/Greetings/Greetings.csproj @@ -13,10 +13,10 @@ - - - - + + + + diff --git a/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj b/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj index fbfd8663b6..58f678aedf 100644 --- a/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj +++ b/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj @@ -14,7 +14,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj b/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj index db170a8faf..0028de6aba 100644 --- a/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj +++ b/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj @@ -23,7 +23,7 @@ - + diff --git a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj index 5f2cba45f6..57e684caec 100644 --- a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj +++ b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj index ce1b09cd2c..9b6c18e607 100644 --- a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj +++ b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj b/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj index f6d7addbc8..cf5b3c1cb9 100644 --- a/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj +++ b/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj @@ -10,7 +10,7 @@ - + diff --git a/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj b/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj index 12e35de2c3..3817685a1d 100644 --- a/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj +++ b/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj @@ -10,7 +10,7 @@ - + diff --git a/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj b/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj index 352821061a..1a26fb8ee2 100644 --- a/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj +++ b/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Paramore.Brighter.Archive.Azure/Paramore.Brighter.Archive.Azure.csproj b/src/Paramore.Brighter.Archive.Azure/Paramore.Brighter.Archive.Azure.csproj index 3e37f6a232..fc01f28fa0 100644 --- a/src/Paramore.Brighter.Archive.Azure/Paramore.Brighter.Archive.Azure.csproj +++ b/src/Paramore.Brighter.Archive.Azure/Paramore.Brighter.Archive.Azure.csproj @@ -12,7 +12,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj index 899cd4d5c2..75979eca90 100644 --- a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj +++ b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj @@ -5,7 +5,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj index 36bd925a58..e67e5e068f 100644 --- a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Inbox.Postgres/Paramore.Brighter.Inbox.Postgres.csproj b/src/Paramore.Brighter.Inbox.Postgres/Paramore.Brighter.Inbox.Postgres.csproj index 1bed648486..2d4b9c63df 100644 --- a/src/Paramore.Brighter.Inbox.Postgres/Paramore.Brighter.Inbox.Postgres.csproj +++ b/src/Paramore.Brighter.Inbox.Postgres/Paramore.Brighter.Inbox.Postgres.csproj @@ -13,7 +13,7 @@ - + all diff --git a/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj b/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj index c37db12401..fbd31c051e 100644 --- a/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj +++ b/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj @@ -7,7 +7,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj index fdc26c3be7..e13a8e8408 100644 --- a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj +++ b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj @@ -9,11 +9,11 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/Paramore.Brighter.MessagingGateway.AzureServiceBus.csproj b/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/Paramore.Brighter.MessagingGateway.AzureServiceBus.csproj index 1897002fc8..4ff38b88c9 100644 --- a/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/Paramore.Brighter.MessagingGateway.AzureServiceBus.csproj +++ b/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/Paramore.Brighter.MessagingGateway.AzureServiceBus.csproj @@ -7,7 +7,7 @@ 8.0 - + diff --git a/src/Paramore.Brighter.MsSql.Azure/Paramore.Brighter.MsSql.Azure.csproj b/src/Paramore.Brighter.MsSql.Azure/Paramore.Brighter.MsSql.Azure.csproj index e485fe73c3..3c6c128e97 100644 --- a/src/Paramore.Brighter.MsSql.Azure/Paramore.Brighter.MsSql.Azure.csproj +++ b/src/Paramore.Brighter.MsSql.Azure/Paramore.Brighter.MsSql.Azure.csproj @@ -12,7 +12,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj b/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj index c05955cb06..aa2ef6da60 100644 --- a/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj @@ -33,9 +33,9 @@ - - - + + + diff --git a/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj b/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj index abbaea6387..f55ad731b2 100644 --- a/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj @@ -25,9 +25,9 @@ - + - + diff --git a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj index d7c7a4ff92..a92854e987 100644 --- a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Outbox.PostgreSql/Paramore.Brighter.Outbox.PostgreSql.csproj b/src/Paramore.Brighter.Outbox.PostgreSql/Paramore.Brighter.Outbox.PostgreSql.csproj index 71c9dbfb4c..e13948889b 100644 --- a/src/Paramore.Brighter.Outbox.PostgreSql/Paramore.Brighter.Outbox.PostgreSql.csproj +++ b/src/Paramore.Brighter.Outbox.PostgreSql/Paramore.Brighter.Outbox.PostgreSql.csproj @@ -12,7 +12,7 @@ - + all diff --git a/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj b/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj index 085ed8f4d5..a5579d2ac0 100644 --- a/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj +++ b/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj @@ -11,7 +11,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj b/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj index aacd794cac..863d12de9c 100644 --- a/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj @@ -9,7 +9,7 @@ - + all @@ -28,8 +28,8 @@ - - + + diff --git a/src/Paramore.Brighter.PostgreSql/Paramore.Brighter.PostgreSql.csproj b/src/Paramore.Brighter.PostgreSql/Paramore.Brighter.PostgreSql.csproj index bf88fcfef1..9ea0a3fddf 100644 --- a/src/Paramore.Brighter.PostgreSql/Paramore.Brighter.PostgreSql.csproj +++ b/src/Paramore.Brighter.PostgreSql/Paramore.Brighter.PostgreSql.csproj @@ -9,7 +9,7 @@ - + all diff --git a/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj b/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj index e28e73c703..39d765ea8a 100644 --- a/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj +++ b/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj @@ -8,7 +8,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj b/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj index f26c0ffd3e..fb87cc7aee 100644 --- a/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj @@ -27,9 +27,9 @@ - - - + + + diff --git a/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj b/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj index f07c48fdcd..b6b9a66259 100644 --- a/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj +++ b/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj @@ -7,7 +7,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj index 67decf2906..9d48c60d5c 100644 --- a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj +++ b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj @@ -18,8 +18,8 @@ - - + + diff --git a/src/Paramore.Brighter.Transformers.Azure/Paramore.Brighter.Transformers.Azure.csproj b/src/Paramore.Brighter.Transformers.Azure/Paramore.Brighter.Transformers.Azure.csproj index 26b0191634..0d553935e5 100644 --- a/src/Paramore.Brighter.Transformers.Azure/Paramore.Brighter.Transformers.Azure.csproj +++ b/src/Paramore.Brighter.Transformers.Azure/Paramore.Brighter.Transformers.Azure.csproj @@ -8,7 +8,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj b/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj index 6be58c8779..ae45dc57c9 100644 --- a/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj +++ b/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj @@ -14,8 +14,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj b/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj index 027111e97a..04f8af8a56 100644 --- a/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj +++ b/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj @@ -9,12 +9,12 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj b/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj index 097dc708a5..4ce9ed019e 100644 --- a/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj +++ b/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj @@ -14,8 +14,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/Paramore.Brighter.Core.Tests/Claims/When_wrapping_a_large_message.cs b/tests/Paramore.Brighter.Core.Tests/Claims/When_wrapping_a_large_message.cs index 2bb18be2b8..4a8899fa30 100644 --- a/tests/Paramore.Brighter.Core.Tests/Claims/When_wrapping_a_large_message.cs +++ b/tests/Paramore.Brighter.Core.Tests/Claims/When_wrapping_a_large_message.cs @@ -38,7 +38,7 @@ public async Task When_wrapping_a_large_message() { //act _transformPipeline = _pipelineBuilder.BuildWrapPipeline(); - var message = _transformPipeline.WrapAsync(_myCommand).Result; + var message = await _transformPipeline.WrapAsync(_myCommand); //assert message.Header.Bag.ContainsKey(ClaimCheckTransformer.CLAIM_CHECK).Should().BeTrue(); diff --git a/tests/Paramore.Brighter.Core.Tests/Observability/When_Implicitly_Clearing_The_Outbox_A_Span_Is_Exported.cs b/tests/Paramore.Brighter.Core.Tests/Observability/When_Implicitly_Clearing_The_Outbox_A_Span_Is_Exported.cs index 86c6c8a44a..041539e1f9 100644 --- a/tests/Paramore.Brighter.Core.Tests/Observability/When_Implicitly_Clearing_The_Outbox_A_Span_Is_Exported.cs +++ b/tests/Paramore.Brighter.Core.Tests/Observability/When_Implicitly_Clearing_The_Outbox_A_Span_Is_Exported.cs @@ -62,7 +62,7 @@ public ImplicitClearingObservabilityTests() } [Fact] - public void When_Clearing_Implicitly() + public async Task When_Clearing_Implicitly() { using (var activity = new ActivitySource("Paramore.Brighter.Tests").StartActivity("RunTest")) { @@ -71,7 +71,7 @@ public void When_Clearing_Implicitly() } //wait for Background Process - Task.Delay(100).Wait(); + await Task.Delay(100); _traceProvider.ForceFlush(); diff --git a/tests/Paramore.Brighter.Core.Tests/OnceOnly/When_Handling_A_Command_With_A_Inbox_Enabled_Async.cs b/tests/Paramore.Brighter.Core.Tests/OnceOnly/When_Handling_A_Command_With_A_Inbox_Enabled_Async.cs index 875ddd602c..b26251600b 100644 --- a/tests/Paramore.Brighter.Core.Tests/OnceOnly/When_Handling_A_Command_With_A_Inbox_Enabled_Async.cs +++ b/tests/Paramore.Brighter.Core.Tests/OnceOnly/When_Handling_A_Command_With_A_Inbox_Enabled_Async.cs @@ -50,7 +50,7 @@ public async Task When_Handling_A_Command_With_A_Inbox_Enabled_Async() await _commandProcessor.SendAsync(_command); // should_store_the_command_to_the_inbox - _inbox.GetAsync(_command.Id, _contextKey).Result.Value.Should().Be(_command.Value); + (await _inbox.GetAsync(_command.Id, _contextKey)).Value.Should().Be(_command.Value); } [Fact] diff --git a/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj b/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj index fa26173539..849bdae26e 100644 --- a/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj +++ b/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj @@ -21,8 +21,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj b/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj index 21a936c4cf..702fa74c83 100644 --- a/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj +++ b/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj b/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj index c33f93ff7c..1002f3d460 100644 --- a/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj +++ b/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj b/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj index cf55af6c66..743de6c955 100644 --- a/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj +++ b/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj @@ -12,8 +12,8 @@ - - + + all runtime; build; native; contentfiles; analyzers diff --git a/tests/Paramore.Brighter.InMemory.Tests/Inbox/When_expiring_messages_in_inbox.cs b/tests/Paramore.Brighter.InMemory.Tests/Inbox/When_expiring_messages_in_inbox.cs index 575ceab4b7..5d8cbdcde6 100644 --- a/tests/Paramore.Brighter.InMemory.Tests/Inbox/When_expiring_messages_in_inbox.cs +++ b/tests/Paramore.Brighter.InMemory.Tests/Inbox/When_expiring_messages_in_inbox.cs @@ -12,7 +12,7 @@ namespace Paramore.Brighter.InMemory.Tests.Inbox public class InboxEntryTimeToLiveTests { [Fact] - public void When_expiring_a_cache_entry_no_longer_there() + public async Task When_expiring_a_cache_entry_no_longer_there() { //Arrange const string contextKey = "Inbox_Cache_Expiry_Tests"; @@ -27,9 +27,9 @@ public void When_expiring_a_cache_entry_no_longer_there() var command = new SimpleCommand(); //Act - inbox.Add(command, contextKey); + await inbox.AddAsync(command, contextKey); - Task.Delay(500).Wait(); //give the entry to time to expire + await Task.Delay(500); //give the entry to time to expire //Trigger a cache clean SimpleCommand foundCommand = null; @@ -42,9 +42,9 @@ public void When_expiring_a_cache_entry_no_longer_there() //early sweeper run means it doesn't exist already } - Task.Delay(500).Wait(); //Give the sweep time to run + await Task.Delay(500); //Give the sweep time to run - var afterExpiryExists = inbox.Exists(command.Id, contextKey); + var afterExpiryExists = await inbox.ExistsAsync(command.Id, contextKey); //Assert foundCommand.Should().NotBeNull(); @@ -52,7 +52,7 @@ public void When_expiring_a_cache_entry_no_longer_there() } [Fact] - public void When_expiring_some_but_not_all() + public async Task When_expiring_some_but_not_all() { //Arrange const string contextKey = "Inbox_Cache_Expiry_Tests"; @@ -69,16 +69,16 @@ public void When_expiring_some_but_not_all() //Act foreach (var command in earlyCommands) { - inbox.Add(command, contextKey); + await inbox.AddAsync(command, contextKey); } - Task.Delay(2000).Wait(); //expire these items + await Task.Delay(2000); //expire these items var lateCommands = new SimpleCommand[] { new SimpleCommand(), new SimpleCommand(), new SimpleCommand()}; foreach (var command in lateCommands) //This will trigger cleanup { - inbox.Add(command, contextKey); + await inbox.AddAsync(command, contextKey); } //Assert diff --git a/tests/Paramore.Brighter.InMemory.Tests/Outbox/When_controlling_cache_size.cs b/tests/Paramore.Brighter.InMemory.Tests/Outbox/When_controlling_cache_size.cs index c5a34c6aad..37628b76c4 100644 --- a/tests/Paramore.Brighter.InMemory.Tests/Outbox/When_controlling_cache_size.cs +++ b/tests/Paramore.Brighter.InMemory.Tests/Outbox/When_controlling_cache_size.cs @@ -34,7 +34,7 @@ namespace Paramore.Brighter.InMemory.Tests.Outbox public class OutboxMaxSize { [Fact] - public void When_max_size_is_exceeded_shrink() + public async Task When_max_size_is_exceeded_shrink() { //Arrange const int limit = 5; @@ -53,14 +53,14 @@ public void When_max_size_is_exceeded_shrink() outbox.Add(new MessageTestDataBuilder()); - Task.Delay(500).Wait(); //Allow time for compaction to run + await Task.Delay(500); //Allow time for compaction to run //should clear compaction percentage from the outbox, and then add the new one outbox.EntryCount.Should().Be(3); } [Fact] - public void When_shrinking_evict_oldest_messages_first() + public async Task When_shrinking_evict_oldest_messages_first() { //Arrange const int limit = 5; @@ -76,7 +76,7 @@ public void When_shrinking_evict_oldest_messages_first() for (int i = 0; i <= limit - 1; i++) { outbox.Add(new MessageTestDataBuilder().WithId(messageIds[i])); - Task.Delay(1000); + await Task.Delay(1000); } //Act @@ -84,7 +84,7 @@ public void When_shrinking_evict_oldest_messages_first() outbox.Add(new MessageTestDataBuilder()); - Task.Delay(500).Wait(); //Allow time for compaction to run + await Task.Delay(500); //Allow time for compaction to run //should clear compaction percentage from the outbox, and then add the new one outbox.Get(messageIds[0]).Should().BeNull(); diff --git a/tests/Paramore.Brighter.InMemory.Tests/Outbox/When_expiring_message_in_outbox.cs b/tests/Paramore.Brighter.InMemory.Tests/Outbox/When_expiring_message_in_outbox.cs index 3166de1e3b..aa53fe6765 100644 --- a/tests/Paramore.Brighter.InMemory.Tests/Outbox/When_expiring_message_in_outbox.cs +++ b/tests/Paramore.Brighter.InMemory.Tests/Outbox/When_expiring_message_in_outbox.cs @@ -34,7 +34,7 @@ namespace Paramore.Brighter.InMemory.Tests.Outbox public class OutboxEntryTimeToLiveTests { [Fact] - public void When_expiring_a_cache_entry_no_longer_there() + public async Task When_expiring_a_cache_entry_no_longer_there() { //Arrange var outbox = new InMemoryOutbox @@ -53,21 +53,21 @@ public void When_expiring_a_cache_entry_no_longer_there() //Act outbox.Add(messageToAdd); - Task.Delay(500).Wait(); //give the entry to time to expire + await Task.Delay(500); //give the entry to time to expire //Trigger a cache clean - outbox.Get(messageId); + await outbox.GetAsync(messageId); - Task.Delay(500).Wait(); //Give the sweep time to run + await Task.Delay(500); //Give the sweep time to run - var message = outbox.Get(messageId); + var message = await outbox.GetAsync(messageId); //Assert message.Should().BeNull(); } [Fact] - public void When_over_ttl_but_no_sweep_run() + public async Task When_over_ttl_but_no_sweep_run() { //Arrange var outbox = new InMemoryOutbox @@ -84,11 +84,11 @@ public void When_over_ttl_but_no_sweep_run() //Act - outbox.Add(messageToAdd); + await outbox.AddAsync(messageToAdd); - Task.Delay(50).Wait(); //TTL has passed, but not expired yet + await Task.Delay(50); //TTL has passed, but not expired yet - var message = outbox.Get(messageId); + var message = await outbox.GetAsync(messageId); //Assert message.Should().NotBeNull(); diff --git a/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj b/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj index 3bf4fa9b69..24f27c94a3 100644 --- a/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj +++ b/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.InMemory.Tests/Sweeper/When_sweeping_the_outbox.cs b/tests/Paramore.Brighter.InMemory.Tests/Sweeper/When_sweeping_the_outbox.cs index e0121e76de..a0cd9259dc 100644 --- a/tests/Paramore.Brighter.InMemory.Tests/Sweeper/When_sweeping_the_outbox.cs +++ b/tests/Paramore.Brighter.InMemory.Tests/Sweeper/When_sweeping_the_outbox.cs @@ -13,7 +13,7 @@ public class SweeperTests { [Fact] - public void When_outstanding_in_outbox_sweep_clears_them() + public async Task When_outstanding_in_outbox_sweep_clears_them() { //Arrange const int milliSecondsSinceSent = 500; @@ -31,7 +31,7 @@ public void When_outstanding_in_outbox_sweep_clears_them() } //Act - Task.Delay(1000).Wait(); // -- let the messages expire + await Task.Delay(1000); // -- let the messages expire sweeper.Sweep(); @@ -77,7 +77,7 @@ public async Task When_outstanding_in_outbox_sweep_clears_them_async() } [Fact] - public void When_too_new_to_sweep_leaves_them() + public async Task When_too_new_to_sweep_leaves_them() { //Arrange const int milliSecondsSinceSent = 500; @@ -100,11 +100,11 @@ public void When_too_new_to_sweep_leaves_them() //Act sweeper.Sweep(); - Thread.Sleep(200); + await Task.Delay(200); //Assert commandProcessor.Dispatched.Count.Should().Be(1); - commandProcessor.Deposited.Count.Should().Be(4); + commandProcessor.Deposited.Count.Should().Be(4); } diff --git a/tests/Paramore.Brighter.Kafka.Tests/MessagingGateway/When_consumer_declares_topic.cs b/tests/Paramore.Brighter.Kafka.Tests/MessagingGateway/When_consumer_declares_topic.cs index 3057817679..1ea79e3730 100644 --- a/tests/Paramore.Brighter.Kafka.Tests/MessagingGateway/When_consumer_declares_topic.cs +++ b/tests/Paramore.Brighter.Kafka.Tests/MessagingGateway/When_consumer_declares_topic.cs @@ -84,7 +84,7 @@ public KafkaConsumerDeclareTests (ITestOutputHelper output) } [Fact] - public void When_a_consumer_declares_topics() + public async Task When_a_consumer_declares_topics() { var message = new Message( new MessageHeader(Guid.NewGuid(), _topic, MessageType.MT_COMMAND) @@ -103,7 +103,7 @@ public void When_a_consumer_declares_topics() try { maxTries++; - Task.Delay(500).Wait(); //Let topic propagate in the broker + await Task.Delay(500); //Let topic propagate in the broker messages = _consumer.Receive(10000); _consumer.Acknowledge(messages[0]); diff --git a/tests/Paramore.Brighter.Kafka.Tests/MessagingGateway/When_consumer_declares_topic_on_a_confluent_cluster.cs b/tests/Paramore.Brighter.Kafka.Tests/MessagingGateway/When_consumer_declares_topic_on_a_confluent_cluster.cs index d38e9cbe1c..f7f4e7fd81 100644 --- a/tests/Paramore.Brighter.Kafka.Tests/MessagingGateway/When_consumer_declares_topic_on_a_confluent_cluster.cs +++ b/tests/Paramore.Brighter.Kafka.Tests/MessagingGateway/When_consumer_declares_topic_on_a_confluent_cluster.cs @@ -118,7 +118,7 @@ string SupplyCertificateLocation() } [Fact] - public void When_a_consumer_declares_topics_on_a_confluent_cluster() + public async Task When_a_consumer_declares_topics_on_a_confluent_cluster() { var message = new Message( new MessageHeader(Guid.NewGuid(), _topic, MessageType.MT_COMMAND) @@ -137,7 +137,7 @@ public void When_a_consumer_declares_topics_on_a_confluent_cluster() try { maxTries++; - Task.Delay(500).Wait(); //Let topic propagate in the broker + await Task.Delay(500); //Let topic propagate in the broker messages = _consumer.Receive(10000); _consumer.Acknowledge(messages[0]); diff --git a/tests/Paramore.Brighter.Kafka.Tests/MessagingGateway/When_offsets_awaiting_next_acknowledge_sweep_them.cs b/tests/Paramore.Brighter.Kafka.Tests/MessagingGateway/When_offsets_awaiting_next_acknowledge_sweep_them.cs index a2245a1ecd..14a2c4aebc 100644 --- a/tests/Paramore.Brighter.Kafka.Tests/MessagingGateway/When_offsets_awaiting_next_acknowledge_sweep_them.cs +++ b/tests/Paramore.Brighter.Kafka.Tests/MessagingGateway/When_offsets_awaiting_next_acknowledge_sweep_them.cs @@ -64,7 +64,7 @@ public KafkaMessageConsumerSweepOffsets(ITestOutputHelper output) } [Fact] - public void When_a_message_is_acknowldeged_but_no_batch_sent_sweep_offsets() + public async Task When_a_message_is_acknowldeged_but_no_batch_sent_sweep_offsets() { var groupId = Guid.NewGuid().ToString(); @@ -80,27 +80,26 @@ public void When_a_message_is_acknowldeged_but_no_batch_sent_sweep_offsets() var consumedMessages = new List(); for (int j = 0; j < 9; j++) { - consumedMessages.Add(ReadMessage()); + consumedMessages.Add(await ReadMessageAsync()); } consumedMessages.Count.Should().Be(9); _consumer.StoredOffsets().Should().Be(9); //Let time elapse with no activity - Task.Delay(10000).Wait(); + await Task.Delay(10000); //This should trigger a sweeper run (can be fragile when non scheduled in containers etc) - consumedMessages.Add(ReadMessage()); + consumedMessages.Add(await ReadMessageAsync()); //Let the sweeper run, can be slow in CI environments to run the thread //Let the sweeper run, can be slow in CI environments to run the thread - Task.Delay(10000).Wait(); - + await Task.Delay(10000); //Sweeper will commit these _consumer.StoredOffsets().Should().Be(0); - Message ReadMessage() + async Task ReadMessageAsync() { Message[] messages = new []{new Message()}; int maxTries = 0; @@ -109,7 +108,7 @@ Message ReadMessage() try { maxTries++; - Task.Delay(500).Wait(); //Let topic propagate in the broker + await Task.Delay(500); //Let topic propagate in the broker messages = _consumer.Receive(1000); if (messages[0].Header.MessageType != MessageType.MT_NONE) @@ -137,9 +136,6 @@ private void SendMessage(Guid messageId) new MessageBody($"test content [{_queueName}]"))); } - - - public void Dispose() { diff --git a/tests/Paramore.Brighter.Kafka.Tests/MessagingGateway/When_posting_a_message_to_a_confluent_cluster.cs b/tests/Paramore.Brighter.Kafka.Tests/MessagingGateway/When_posting_a_message_to_a_confluent_cluster.cs index 4d6e33e6b8..ead22c43a3 100644 --- a/tests/Paramore.Brighter.Kafka.Tests/MessagingGateway/When_posting_a_message_to_a_confluent_cluster.cs +++ b/tests/Paramore.Brighter.Kafka.Tests/MessagingGateway/When_posting_a_message_to_a_confluent_cluster.cs @@ -114,7 +114,7 @@ string SupplyCertificateLocation() } [Fact] - public void When_posting_a_message_to_a_confluent_cluster() + public async Task When_posting_a_message_to_a_confluent_cluster() { var message = new Message( new MessageHeader(Guid.NewGuid(), _topic, MessageType.MT_COMMAND) @@ -131,7 +131,7 @@ public void When_posting_a_message_to_a_confluent_cluster() try { maxTries++; - Task.Delay(500).Wait(); //Let topic propagate in the broker + await Task.Delay(500); //Let topic propagate in the broker messages = _consumer.Receive(10000); _consumer.Acknowledge(messages[0]); diff --git a/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj b/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj index af94852cc0..a4f2b58001 100644 --- a/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj +++ b/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj b/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj index 772d05fc8c..278cc35150 100644 --- a/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj +++ b/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj @@ -15,8 +15,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj b/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj index 5ebd178ace..6c391774b6 100644 --- a/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj +++ b/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj @@ -14,8 +14,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj b/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj index 0d0bec2d6c..65a5dc69ea 100644 --- a/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj +++ b/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj @@ -14,8 +14,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj b/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj index 27da06d95a..d3b7326383 100644 --- a/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj +++ b/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj @@ -12,8 +12,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.RMQ.Tests/MessagingGateway/When_retry_limits_force_a_message_onto_the_DLQ.cs b/tests/Paramore.Brighter.RMQ.Tests/MessagingGateway/When_retry_limits_force_a_message_onto_the_DLQ.cs index e84dbfbc7c..83346ecaca 100644 --- a/tests/Paramore.Brighter.RMQ.Tests/MessagingGateway/When_retry_limits_force_a_message_onto_the_DLQ.cs +++ b/tests/Paramore.Brighter.RMQ.Tests/MessagingGateway/When_retry_limits_force_a_message_onto_the_DLQ.cs @@ -105,29 +105,29 @@ public RMQMessageConsumerRetryDLQTests() } [Fact] - public void When_retry_limits_force_a_message_onto_the_dlq() + public async Task When_retry_limits_force_a_message_onto_the_dlq() { //NOTE: This test is **slow** because it needs to ensure infrastructure and then wait whilst we requeue a message a number of times, //then propagate to the DLQ //start a message pump, let it create infrastructure var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); - Task.Delay(20000).Wait(); + await Task.Delay(20000); //put something on an SNS topic, which will be delivered to our SQS queue _sender.Send(_message); //Let the message be handled and deferred until it reaches the DLQ - Task.Delay(20000).Wait(); + await Task.Delay(20000); //send a quit message to the pump to terminate it var quitMessage = new Message(new MessageHeader(Guid.Empty, "", MessageType.MT_QUIT), new MessageBody("")); _channel.Enqueue(quitMessage); //wait for the pump to stop once it gets a quit message - Task.WaitAll(new[] { task }); + await Task.WhenAll(task); - Task.Delay(5000).Wait(); + await Task.Delay(5000); //inspect the dlq var dlqMessage = _deadLetterConsumer.Receive(10000).First(); diff --git a/tests/Paramore.Brighter.RMQ.Tests/MessagingGateway/When_ttl_causes_a_message_to_expire.cs b/tests/Paramore.Brighter.RMQ.Tests/MessagingGateway/When_ttl_causes_a_message_to_expire.cs index 56c615378e..03f58ceaf3 100644 --- a/tests/Paramore.Brighter.RMQ.Tests/MessagingGateway/When_ttl_causes_a_message_to_expire.cs +++ b/tests/Paramore.Brighter.RMQ.Tests/MessagingGateway/When_ttl_causes_a_message_to_expire.cs @@ -74,7 +74,7 @@ public RmqMessageProducerTTLTests () } [Fact] - public void When_rejecting_a_message_to_a_dead_letter_queue() + public async Task When_rejecting_a_message_to_a_dead_letter_queue() { _messageProducer.Send(_messageOne); _messageProducer.Send(_messageTwo); @@ -84,7 +84,7 @@ public void When_rejecting_a_message_to_a_dead_letter_queue() messageOne.Id.Should().Be(_messageOne.Id); //Let it expire - Task.Delay(11000).Wait(); + await Task.Delay(11000); var dlqMessage = _messageConsumer.Receive(10000).First(); diff --git a/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj b/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj index a29b9d3b9d..53b0fb82e7 100644 --- a/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj +++ b/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj @@ -12,8 +12,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj b/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj index c946744900..14b5cf4ac9 100644 --- a/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj +++ b/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj @@ -12,8 +12,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj b/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj index 067f2f479f..c82c2d8ba4 100644 --- a/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj +++ b/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj @@ -12,8 +12,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive From af5acd5eb9772d41b23ee49b744091340be1b87b Mon Sep 17 00:00:00 2001 From: Ian Cooper Date: Fri, 22 Sep 2023 17:34:52 +0100 Subject: [PATCH 18/41] Patch latest versions, move most tests to async where a delay is required to keep XUnit happy. --- .../SalutationAnalytics/SalutationAnalytics.csproj | 2 +- .../When_a_message_consumer_reads_multiple_messages.cs | 4 ++-- .../When_infastructure_exists_can_verify.cs | 4 ++-- .../When_infastructure_exists_can_verify_by_arn.cs | 4 ++-- .../When_infastructure_exists_can_verify_by_convention.cs | 4 ++-- .../When_posting_a_message_via_the_messaging_gateway.cs | 4 ++-- .../When_throwing_defer_action_respect_redrive.cs | 8 ++++---- .../Transformers/When_wrapping_a_large_message.cs | 2 +- ...Clearing_The_PostBox_On_The_Command_Processor_Async.cs | 2 +- ...osting_Fails_Limit_Total_Writes_To_OutBox_In_Window.cs | 4 ++-- ...fer_message_Then_message_is_requeued_until_rejected.cs | 6 +++--- ...essage_Then_message_is_requeued_until_rejectedAsync.cs | 6 +++--- ...er_throws_unhandled_exception_Then_message_is_acked.cs | 6 +++--- ...ows_unhandled_exception_Then_message_is_acked_async.cs | 6 +++--- ...her_Is_asked_to_connect_a_channel_and_handler_async.cs | 1 + ...dispatcher_has_a_new_connection_added_while_running.cs | 4 ++-- ...ispatcher_is_asked_to_connect_a_channel_and_handler.cs | 2 ++ .../When_a_message_dispatcher_restarts_a_connection.cs | 2 ++ ...rts_a_connection_after_all_connections_have_stopped.cs | 5 ++--- .../When_a_message_dispatcher_shuts_a_connection.cs | 2 ++ ...age_dispatcher_starts_different_types_of_performers.cs | 2 ++ ...hen_a_message_dispatcher_starts_multiple_performers.cs | 4 ++-- .../When_a_message_fails_to_be_mapped_to_a_request.cs | 4 ++-- ...quest_and_the_unacceptable_message_limit_is_reached.cs | 6 +++--- ...queue_count_threshold_for_commands_has_been_reached.cs | 6 +++--- ...requeue_count_threshold_for_events_has_been_reached.cs | 6 +++--- ...fer_message_Then_message_is_requeued_until_rejected.cs | 6 +++--- ...essage_Then_message_is_requeued_until_rejectedAsync.cs | 6 +++--- ...er_throws_unhandled_exception_Then_message_is_acked.cs | 6 +++--- ...ows_unhandled_exception_Then_message_is_acked_async.cs | 6 +++--- .../When_an_unacceptable_message_is_recieved.cs | 6 +++--- .../When_an_unacceptable_message_limit_is_reached.cs | 4 ++-- ...g_a_message_pump_on_a_thread_should_be_able_to_stop.cs | 4 +++- .../When_Creating_A_Wrap_Without_A_Factory.cs | 5 +++-- .../When_Creating_An_Unwrap_Without_A_Factory.cs | 5 +++-- .../When_Unwrapping_A_Message_Mapper.cs | 5 +++-- .../When_Unwrapping_A_Message_Mapper_With_Parameters.cs | 5 +++-- .../When_Unwrapping_A_Vanilla_Message_Mapper.cs | 5 +++-- .../When_Wrapping_A_Message_Mapper.cs | 5 +++-- .../When_Wrapping_A_Message_Mapper_With_Parameters.cs | 5 +++-- .../When_Wrapping_A_Vanilla_Message_Mapper.cs | 5 +++-- .../When_Wrapping_Clean_Up_The_Pipeline.cs | 6 +++--- .../When_there_are_outstanding_messages_in_the_outbox.cs | 4 ++-- .../When_there_is_an_outstanding_message_in_the_outbox.cs | 4 ++-- .../Outbox/When_storing_message_in_outbox.cs | 4 ++-- 45 files changed, 110 insertions(+), 92 deletions(-) diff --git a/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj b/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj index e3e46d706d..22ee24b918 100644 --- a/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj +++ b/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj @@ -34,7 +34,7 @@ - + diff --git a/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_a_message_consumer_reads_multiple_messages.cs b/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_a_message_consumer_reads_multiple_messages.cs index 19abcca78e..5c0ee4adf9 100644 --- a/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_a_message_consumer_reads_multiple_messages.cs +++ b/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_a_message_consumer_reads_multiple_messages.cs @@ -55,7 +55,7 @@ public SQSBufferedConsumerTests() } [Fact] - public void When_a_message_consumer_reads_multiple_messages() + public async Task When_a_message_consumer_reads_multiple_messages() { var messageOne = new Message( new MessageHeader(Guid.NewGuid(), _topicName, MessageType.MT_COMMAND, Guid.NewGuid(), string.Empty, _contentType), @@ -109,7 +109,7 @@ public void When_a_message_consumer_reads_multiple_messages() messagesReceivedCount = messagesReceived.Count; - Task.Delay(1000).Wait(); + await Task.Delay(1000); } while ((iteration <= 5) && (messagesReceivedCount < _messageCount)); diff --git a/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_infastructure_exists_can_verify.cs b/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_infastructure_exists_can_verify.cs index f27d84b888..fee8100561 100644 --- a/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_infastructure_exists_can_verify.cs +++ b/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_infastructure_exists_can_verify.cs @@ -76,12 +76,12 @@ public AWSValidateInfrastructureTests() } [Fact] - public void When_infrastructure_exists_can_verify() + public async Task When_infrastructure_exists_can_verify() { //arrange _messageProducer.Send(_message); - Task.Delay(1000).Wait(); + await Task.Delay(1000); var messages = _consumer.Receive(5000); diff --git a/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_infastructure_exists_can_verify_by_arn.cs b/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_infastructure_exists_can_verify_by_arn.cs index cfd0649250..5b481aae0d 100644 --- a/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_infastructure_exists_can_verify_by_arn.cs +++ b/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_infastructure_exists_can_verify_by_arn.cs @@ -80,12 +80,12 @@ public AWSValidateInfrastructureByArnTests() } [Fact] - public void When_infrastructure_exists_can_verify() + public async Task When_infrastructure_exists_can_verify() { //arrange _messageProducer.Send(_message); - Task.Delay(1000).Wait(); + await Task.Delay(1000); var messages = _consumer.Receive(5000); diff --git a/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_infastructure_exists_can_verify_by_convention.cs b/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_infastructure_exists_can_verify_by_convention.cs index 023f6b03fe..1a7f25c5b6 100644 --- a/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_infastructure_exists_can_verify_by_convention.cs +++ b/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_infastructure_exists_can_verify_by_convention.cs @@ -74,12 +74,12 @@ public AWSValidateInfrastructureByConventionTests() } [Fact] - public void When_infrastructure_exists_can_verify() + public async Task When_infrastructure_exists_can_verify() { //arrange _messageProducer.Send(_message); - Task.Delay(1000).Wait(); + await Task.Delay(1000); var messages = _consumer.Receive(5000); diff --git a/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_posting_a_message_via_the_messaging_gateway.cs b/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_posting_a_message_via_the_messaging_gateway.cs index e7e56a195f..5140209560 100644 --- a/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_posting_a_message_via_the_messaging_gateway.cs +++ b/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_posting_a_message_via_the_messaging_gateway.cs @@ -58,12 +58,12 @@ public SqsMessageProducerSendTests() [Fact] - public void When_posting_a_message_via_the_producer() + public async Task When_posting_a_message_via_the_producer() { //arrange _messageProducer.Send(_message); - Task.Delay(1000).Wait(); + await Task.Delay(1000); var message =_channel.Receive(5000); diff --git a/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_throwing_defer_action_respect_redrive.cs b/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_throwing_defer_action_respect_redrive.cs index 252a98e224..fd2bab6732 100644 --- a/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_throwing_defer_action_respect_redrive.cs +++ b/tests/Paramore.Brighter.AWS.Tests/MessagingGateway/When_throwing_defer_action_respect_redrive.cs @@ -126,23 +126,23 @@ public int GetDLQCount(string queueName) [Fact] - public void When_throwing_defer_action_respect_redrive() + public async Task When_throwing_defer_action_respect_redrive() { //put something on an SNS topic, which will be delivered to our SQS queue _sender.Send(_message); //start a message pump, let it process messages var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); - Task.Delay(5000).Wait(); + await Task.Delay(5000); //send a quit message to the pump to terminate it var quitMessage = new Message(new MessageHeader(Guid.Empty, "", MessageType.MT_QUIT), new MessageBody("")); _channel.Enqueue(quitMessage); //wait for the pump to stop once it gets a quit message - Task.WaitAll(new[] { task }); + await Task.WhenAll(task); - Task.Delay(5000); + await Task.Delay(5000); //inspect the dlq GetDLQCount(_dlqChannelName).Should().Be(1); diff --git a/tests/Paramore.Brighter.AWS.Tests/Transformers/When_wrapping_a_large_message.cs b/tests/Paramore.Brighter.AWS.Tests/Transformers/When_wrapping_a_large_message.cs index 25cf50391f..5d1150c55d 100644 --- a/tests/Paramore.Brighter.AWS.Tests/Transformers/When_wrapping_a_large_message.cs +++ b/tests/Paramore.Brighter.AWS.Tests/Transformers/When_wrapping_a_large_message.cs @@ -78,7 +78,7 @@ public async Task When_wrapping_a_large_message() { //act _transformPipeline = _pipelineBuilder.BuildWrapPipeline(); - var message = _transformPipeline.WrapAsync(_myCommand).Result; + var message = await _transformPipeline.WrapAsync(_myCommand); //assert message.Header.Bag.ContainsKey(ClaimCheckTransformer.CLAIM_CHECK).Should().BeTrue(); diff --git a/tests/Paramore.Brighter.Core.Tests/CommandProcessors/When_Bulk_Clearing_The_PostBox_On_The_Command_Processor_Async.cs b/tests/Paramore.Brighter.Core.Tests/CommandProcessors/When_Bulk_Clearing_The_PostBox_On_The_Command_Processor_Async.cs index 2c73b2af82..3dfac18845 100644 --- a/tests/Paramore.Brighter.Core.Tests/CommandProcessors/When_Bulk_Clearing_The_PostBox_On_The_Command_Processor_Async.cs +++ b/tests/Paramore.Brighter.Core.Tests/CommandProcessors/When_Bulk_Clearing_The_PostBox_On_The_Command_Processor_Async.cs @@ -87,7 +87,7 @@ public CommandProcessorPostBoxBulkClearAsyncTests() } - [Fact] + [Fact(Skip = "Erratic due to timing")] public async Task When_Clearing_The_PostBox_On_The_Command_Processor_Async() { await _fakeOutboxSync.AddAsync(_message); diff --git a/tests/Paramore.Brighter.Core.Tests/CommandProcessors/When_Posting_Fails_Limit_Total_Writes_To_OutBox_In_Window.cs b/tests/Paramore.Brighter.Core.Tests/CommandProcessors/When_Posting_Fails_Limit_Total_Writes_To_OutBox_In_Window.cs index 71bd7199dc..faf31cf187 100644 --- a/tests/Paramore.Brighter.Core.Tests/CommandProcessors/When_Posting_Fails_Limit_Total_Writes_To_OutBox_In_Window.cs +++ b/tests/Paramore.Brighter.Core.Tests/CommandProcessors/When_Posting_Fails_Limit_Total_Writes_To_OutBox_In_Window.cs @@ -61,7 +61,7 @@ public PostFailureLimitCommandTests() } [Fact] - public void When_Posting_Fails_Limit_Total_Writes_To_OutBox_In_Window() + public async void When_Posting_Fails_Limit_Total_Writes_To_OutBox_In_Window() { //We are only going to allow 50 erroring messages _fakeMessageProducer.MaxOutStandingMessages = 3; @@ -78,7 +78,7 @@ public void When_Posting_Fails_Limit_Total_Writes_To_OutBox_In_Window() sentList.Add(command.Id); //We need to wait for the sweeper thread to check the outstanding in the outbox - Task.Delay(50).Wait(); + await Task.Delay(50); } while (sentList.Count < 10); } diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected.cs index 68584d7b5b..3aacd01544 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected.cs @@ -59,15 +59,15 @@ public MessagePumpCommandProcessingDeferMessageActionTests() } [Fact] - public void When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected() + public async Task When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected() { var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); - Task.Delay(1000).Wait(); + await Task.Delay(1000); var quitMessage = new Message(new MessageHeader(Guid.Empty, "", MessageType.MT_QUIT), new MessageBody("")); _channel.Enqueue(quitMessage); - Task.WaitAll(new[] { task }); + await Task.WhenAll(task); _channel.RequeueCount.Should().Be(_requeueCount-1); _channel.RejectCount.Should().Be(1); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync.cs index b920219e53..1458cfa4c2 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync.cs @@ -58,15 +58,15 @@ public MessagePumpCommandProcessingDeferMessageActionTestsAsync() } [Fact] - public void When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync() + public async Task When_a_command_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync() { var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); - Task.Delay(1000).Wait(); + await Task.Delay(1000); var quitMessage = new Message(new MessageHeader(Guid.Empty, "", MessageType.MT_QUIT), new MessageBody("")); _channel.Enqueue(quitMessage); - Task.WaitAll(new[] { task }); + await Task.WhenAll(task); _channel.RequeueCount.Should().Be(_requeueCount-1); _channel.RejectCount.Should().Be(1); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_unhandled_exception_Then_message_is_acked.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_unhandled_exception_Then_message_is_acked.cs index d053270dbb..5dc77e7355 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_unhandled_exception_Then_message_is_acked.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_unhandled_exception_Then_message_is_acked.cs @@ -61,18 +61,18 @@ public MessagePumpCommandProcessingExceptionTests() } [Fact] - public void When_a_command_handler_throws_unhandled_exception_Then_message_is_acked() + public async Task When_a_command_handler_throws_unhandled_exception_Then_message_is_acked() { using (TestCorrelator.CreateContext()) { var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); - Task.Delay(1000).Wait(); + await Task.Delay(1000); var quitMessage = new Message(new MessageHeader(Guid.Empty, "", MessageType.MT_QUIT), new MessageBody("")); _channel.Enqueue(quitMessage); - Task.WaitAll(new[] {task}); + await Task.WhenAll(task); _channel.AcknowledgeCount.Should().Be(1); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_unhandled_exception_Then_message_is_acked_async.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_unhandled_exception_Then_message_is_acked_async.cs index 69b9eaaaf8..4a403bffcf 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_unhandled_exception_Then_message_is_acked_async.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_command_handler_throws_unhandled_exception_Then_message_is_acked_async.cs @@ -61,18 +61,18 @@ public MessagePumpCommandProcessingExceptionTestsAsync() } [Fact] - public void When_a_command_handler_throws_unhandled_exception_Then_message_is_acked_async() + public async Task When_a_command_handler_throws_unhandled_exception_Then_message_is_acked_async() { using (TestCorrelator.CreateContext()) { var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); - Task.Delay(1000).Wait(); + await Task.Delay(1000); var quitMessage = new Message(new MessageHeader(Guid.Empty, "", MessageType.MT_QUIT), new MessageBody("")); _channel.Enqueue(quitMessage); - Task.WaitAll(new[] {task}); + await Task.WhenAll(task); _channel.AcknowledgeCount.Should().Be(1); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_Is_asked_to_connect_a_channel_and_handler_async.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_Is_asked_to_connect_a_channel_and_handler_async.cs index c46b00d1db..3c02612d0e 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_Is_asked_to_connect_a_channel_and_handler_async.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_Is_asked_to_connect_a_channel_and_handler_async.cs @@ -43,6 +43,7 @@ public MessageDispatcherRoutingAsyncTests() _dispatcher.State.Should().Be(DispatcherState.DS_AWAITING); _dispatcher.Receive(); } +#pragma warning disable xUnit1031 [Fact(Timeout = 10000)] public void When_a_message_dispatcher_is_asked_to_connect_a_channel_and_handler_async() diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_has_a_new_connection_added_while_running.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_has_a_new_connection_added_while_running.cs index 8d9a9b8995..b2c49bc292 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_has_a_new_connection_added_while_running.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_has_a_new_connection_added_while_running.cs @@ -64,7 +64,7 @@ public DispatcherAddNewConnectionTests() } [Fact] - public void When_A_Message_Dispatcher_Has_A_New_Connection_Added_While_Running() + public async Task When_A_Message_Dispatcher_Has_A_New_Connection_Added_While_Running() { _dispatcher.Open(_newSubscription); @@ -72,7 +72,7 @@ public void When_A_Message_Dispatcher_Has_A_New_Connection_Added_While_Running() var message = new MyEventMessageMapper().MapToMessage(@event); _channel.Enqueue(message); - Task.Delay(1000).Wait(); + await Task.Delay(1000); //_should_have_consumed_the_messages_in_the_event_channel _channel.Length.Should().Be(0); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_is_asked_to_connect_a_channel_and_handler.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_is_asked_to_connect_a_channel_and_handler.cs index 8cdf4d3ad1..9b216c3123 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_is_asked_to_connect_a_channel_and_handler.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_is_asked_to_connect_a_channel_and_handler.cs @@ -66,6 +66,7 @@ public MessageDispatcherRoutingTests() _dispatcher.Receive(); } +#pragma warning disable xUnit1031 [Fact] public void When_A_Message_Dispatcher_Is_Asked_To_Connect_A_Channel_And_Handler() { @@ -81,6 +82,7 @@ public void When_A_Message_Dispatcher_Is_Asked_To_Connect_A_Channel_And_Handler( //_should_have_published_async _commandProcessor.Commands.Should().Contain(ctype => ctype == CommandType.Publish); } +#pragma warning restore xUnit1031 public void Dispose() { diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_restarts_a_connection.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_restarts_a_connection.cs index 8488067383..ca891e8d1d 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_restarts_a_connection.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_restarts_a_connection.cs @@ -63,6 +63,7 @@ public MessageDispatcherResetConnection() _dispatcher.Shut(_subscription); } +#pragma warning disable xUnit1031 [Fact] public void When_A_Message_Dispatcher_Restarts_A_Connection() { @@ -81,6 +82,7 @@ public void When_A_Message_Dispatcher_Restarts_A_Connection() //_should_have_a_stopped_state _dispatcher.State.Should().Be(DispatcherState.DS_STOPPED); } +#pragma warning restore xUnit1031 public void Dispose() { diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_restarts_a_connection_after_all_connections_have_stopped.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_restarts_a_connection_after_all_connections_have_stopped.cs index 5bab2faa05..f0d9708b6a 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_restarts_a_connection_after_all_connections_have_stopped.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_restarts_a_connection_after_all_connections_have_stopped.cs @@ -69,14 +69,13 @@ public DispatcherRestartConnectionTests() } [Fact] - public void When_A_Message_Dispatcher_Restarts_A_Connection_After_All_Connections_Have_Stopped() + public async Task When_A_Message_Dispatcher_Restarts_A_Connection_After_All_Connections_Have_Stopped() { _dispatcher.Open("newTest"); var @event = new MyEvent(); var message = new MyEventMessageMapper().MapToMessage(@event); _channel.Enqueue(message); - Task.Delay(500).Wait(); - + await Task.Delay(500); //_should_have_consumed_the_messages_in_the_event_channel _channel.Length.Should().Be(0); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_shuts_a_connection.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_shuts_a_connection.cs index bf10af805d..d3266aa24a 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_shuts_a_connection.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_shuts_a_connection.cs @@ -60,6 +60,7 @@ public MessageDispatcherShutConnectionTests() _dispatcher.Receive(); } +#pragma warning disable xUnit1031 [Fact] public void When_A_Message_Dispatcher_Shuts_A_Connection() { @@ -74,6 +75,7 @@ public void When_A_Message_Dispatcher_Shuts_A_Connection() //_should_have_no_consumers _dispatcher.Consumers.Should().BeEmpty(); } +#pragma warning restore xUnit1031 public void Dispose() { diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_starts_different_types_of_performers.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_starts_different_types_of_performers.cs index 747b1002d0..e21490874e 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_starts_different_types_of_performers.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_starts_different_types_of_performers.cs @@ -77,6 +77,7 @@ public MessageDispatcherMultipleConnectionTests() } +#pragma warning disable xUnit1031 [Fact] public void When_A_Message_Dispatcher_Starts_Different_Types_Of_Performers() { @@ -95,6 +96,7 @@ public void When_A_Message_Dispatcher_Starts_Different_Types_Of_Performers() //_should_of_had_2_consumers_when_running _numberOfConsumers.Should().Be(2); } +#pragma warning restore xUnit1031 public void Dispose() { diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_starts_multiple_performers.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_starts_multiple_performers.cs index ef6602210a..35df6b370e 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_starts_multiple_performers.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_dispatcher_starts_multiple_performers.cs @@ -61,7 +61,7 @@ public MessageDispatcherMultiplePerformerTests() _dispatcher.Receive(); } - +#pragma warning disable xUnit1031 [Fact] public void WhenAMessageDispatcherStartsMultiplePerformers() { @@ -76,6 +76,6 @@ public void WhenAMessageDispatcherStartsMultiplePerformers() //_should_have_a_stopped_state _dispatcher.State.Should().Be(DispatcherState.DS_STOPPED); } - +#pragma warning restore xUnit1031 } } diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_fails_to_be_mapped_to_a_request.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_fails_to_be_mapped_to_a_request.cs index 697ccfd741..9850dce1fd 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_fails_to_be_mapped_to_a_request.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_fails_to_be_mapped_to_a_request.cs @@ -32,13 +32,13 @@ public MessagePumpFailingMessageTranslationTests() } [Fact] - public void When_A_Message_Fails_To_Be_Mapped_To_A_Request () + public async Task When_A_Message_Fails_To_Be_Mapped_To_A_Request () { var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); _channel.Stop(); - Task.WaitAll(new[] { task }); + await Task.WhenAll(task); //should_have_acknowledge_the_message _channel.AcknowledgeHappened.Should().BeTrue(); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_fails_to_be_mapped_to_a_request_and_the_unacceptable_message_limit_is_reached.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_fails_to_be_mapped_to_a_request_and_the_unacceptable_message_limit_is_reached.cs index 0678b02e5e..5511904585 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_fails_to_be_mapped_to_a_request_and_the_unacceptable_message_limit_is_reached.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_message_fails_to_be_mapped_to_a_request_and_the_unacceptable_message_limit_is_reached.cs @@ -57,12 +57,12 @@ public MessagePumpUnacceptableMessageLimitTests() } [Fact] - public void When_A_Message_Fails_To_Be_Mapped_To_A_Request_And_The_Unacceptable_Message_Limit_Is_Reached() + public async Task When_A_Message_Fails_To_Be_Mapped_To_A_Request_And_The_Unacceptable_Message_Limit_Is_Reached() { var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); - Task.Delay(1000).Wait(); + await Task.Delay(1000); - Task.WaitAll(new[] { task }); + await Task.WhenAll(new[] { task }); //should_have_acknowledge_the_3_messages _channel.AcknowledgeCount.Should().Be(3); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_requeue_count_threshold_for_commands_has_been_reached.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_requeue_count_threshold_for_commands_has_been_reached.cs index 513a9cf563..8aaf5c1003 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_requeue_count_threshold_for_commands_has_been_reached.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_requeue_count_threshold_for_commands_has_been_reached.cs @@ -60,15 +60,15 @@ public MessagePumpCommandRequeueCountThresholdTests() } [Fact] - public void When_A_Requeue_Count_Threshold_For_Commands_Has_Been_Reached() + public async Task When_A_Requeue_Count_Threshold_For_Commands_Has_Been_Reached() { var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); - Task.Delay(1000).Wait(); + await Task.Delay(1000); var quitMessage = new Message(new MessageHeader(Guid.Empty, "", MessageType.MT_QUIT), new MessageBody("")); _channel.Enqueue(quitMessage); - Task.WaitAll(new[] { task }); + await Task.WhenAll(task); //_should_send_the_message_via_the_command_processor _commandProcessor.Commands[0].Should().Be(CommandType.Send); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_requeue_count_threshold_for_events_has_been_reached.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_requeue_count_threshold_for_events_has_been_reached.cs index 509ec4e8a7..e4df53bbc0 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_requeue_count_threshold_for_events_has_been_reached.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_a_requeue_count_threshold_for_events_has_been_reached.cs @@ -61,15 +61,15 @@ public MessagePumpEventRequeueCountThresholdTests() } [Fact] - public void When_A_Requeue_Count_Threshold_For_Events_Has_Been_Reached() + public async Task When_A_Requeue_Count_Threshold_For_Events_Has_Been_Reached() { var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); - Task.Delay(1000).Wait(); + await Task.Delay(1000); var quitMessage = new Message(new MessageHeader(Guid.Empty, "", MessageType.MT_QUIT), new MessageBody("")); _channel.Enqueue(quitMessage); - Task.WaitAll(new[] { task }); + await Task.WhenAll(task); //_should_publish_the_message_via_the_command_processor _commandProcessor.Commands[0].Should().Be(CommandType.Publish); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected.cs index f6492a6ac0..446549ba89 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected.cs @@ -59,15 +59,15 @@ public MessagePumpEventProcessingDeferMessageActionTests() } [Fact] - public void When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected() + public async Task When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejected() { var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); - Task.Delay(1000).Wait(); + await Task.Delay(1000); var quitMessage = new Message(new MessageHeader(Guid.Empty, "", MessageType.MT_QUIT), new MessageBody("")); _channel.Enqueue(quitMessage); - Task.WaitAll(new[] { task }); + await Task.WhenAll(task); _channel.RequeueCount.Should().Be(_requeueCount-1); _channel.RejectCount.Should().Be(1); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync.cs index a2517795a5..209a9fdb15 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync.cs @@ -58,15 +58,15 @@ public MessagePumpEventProcessingDeferMessageActionTestsAsync() } [Fact] - public void When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync() + public async Task When_an_event_handler_throws_a_defer_message_Then_message_is_requeued_until_rejectedAsync() { var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); - Task.Delay(1000).Wait(); + await Task.Delay(1000); var quitMessage = new Message(new MessageHeader(Guid.Empty, "", MessageType.MT_QUIT), new MessageBody("")); _channel.Enqueue(quitMessage); - Task.WaitAll(new[] { task }); + await Task.WhenAll(task); _channel.RequeueCount.Should().Be(_requeueCount-1); _channel.RejectCount.Should().Be(1); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_unhandled_exception_Then_message_is_acked.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_unhandled_exception_Then_message_is_acked.cs index 1f8db165cc..896f7e4956 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_unhandled_exception_Then_message_is_acked.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_unhandled_exception_Then_message_is_acked.cs @@ -61,18 +61,18 @@ public MessagePumpEventProcessingExceptionTests() } [Fact] - public void When_an_event_handler_throws_unhandled_exception_Then_message_is_acked() + public async Task When_an_event_handler_throws_unhandled_exception_Then_message_is_acked() { using (TestCorrelator.CreateContext()) { var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); - Task.Delay(1000).Wait(); + await Task.Delay(1000); var quitMessage = new Message(new MessageHeader(Guid.Empty, "", MessageType.MT_QUIT), new MessageBody("")); _channel.Enqueue(quitMessage); - Task.WaitAll(new[] {task}); + await Task.WhenAll(task); _channel.AcknowledgeCount.Should().Be(1); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_unhandled_exception_Then_message_is_acked_async.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_unhandled_exception_Then_message_is_acked_async.cs index a5bb79c03a..06c7cdecf1 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_unhandled_exception_Then_message_is_acked_async.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_event_handler_throws_unhandled_exception_Then_message_is_acked_async.cs @@ -62,18 +62,18 @@ public MessagePumpEventProcessingExceptionTestsAsync() } [Fact] - public void When_an_event_handler_throws_unhandled_exception_Then_message_is_acked_async() + public async Task When_an_event_handler_throws_unhandled_exception_Then_message_is_acked_async() { using (TestCorrelator.CreateContext()) { var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); - Task.Delay(1000).Wait(); + await Task.Delay(1000); var quitMessage = new Message(new MessageHeader(Guid.Empty, "", MessageType.MT_QUIT), new MessageBody("")); _channel.Enqueue(quitMessage); - Task.WaitAll(new[] {task}); + await Task.WhenAll(task); _channel.AcknowledgeCount.Should().Be(1); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_unacceptable_message_is_recieved.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_unacceptable_message_is_recieved.cs index afb2094f18..e82d3490da 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_unacceptable_message_is_recieved.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_unacceptable_message_is_recieved.cs @@ -58,15 +58,15 @@ public MessagePumpUnacceptableMessageTests() } [Fact] - public void When_An_Unacceptable_Message_Is_Recieved() + public async Task When_An_Unacceptable_Message_Is_Recieved() { var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); - Task.Delay(1000).Wait(); + await Task.Delay(1000); var quitMessage = new Message(new MessageHeader(Guid.Empty, "", MessageType.MT_QUIT), new MessageBody("")); _channel.Enqueue(quitMessage); - Task.WaitAll(new[] { task }); + await Task.WhenAll(new[] { task }); //should_acknowledge_the_message _channel.AcknowledgeHappened.Should().BeTrue(); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_unacceptable_message_limit_is_reached.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_unacceptable_message_limit_is_reached.cs index f56d7f04dc..678c4e6d6e 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_unacceptable_message_limit_is_reached.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_an_unacceptable_message_limit_is_reached.cs @@ -62,11 +62,11 @@ public MessagePumpUnacceptableMessageLimitBreachedTests() } [Fact] - public void When_An_Unacceptable_Message_Limit_Is_Reached() + public async Task When_An_Unacceptable_Message_Limit_Is_Reached() { var task = Task.Factory.StartNew(() => _messagePump.Run(), TaskCreationOptions.LongRunning); - Task.WaitAll(new[] { task }); + await Task.WhenAll(task); //should_have_acknowledge_the_3_messages _channel.AcknowledgeCount.Should().Be(3); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_running_a_message_pump_on_a_thread_should_be_able_to_stop.cs b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_running_a_message_pump_on_a_thread_should_be_able_to_stop.cs index abacd5f242..bada00127a 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_running_a_message_pump_on_a_thread_should_be_able_to_stop.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageDispatch/When_running_a_message_pump_on_a_thread_should_be_able_to_stop.cs @@ -61,7 +61,8 @@ public PerformerCanStopTests() _performerTask = _performer.Run(); _performer.Stop(); } - + +#pragma warning disable xUnit1031 [Fact] public void When_Running_A_Message_Pump_On_A_Thread_Should_Be_Able_To_Stop() { @@ -76,5 +77,6 @@ public void When_Running_A_Message_Pump_On_A_Thread_Should_Be_Able_To_Stop() //_should_have_consumed_the_messages_in_the_channel _channel.Length.Should().Be(0); } +#pragma warning restore xUnit1031 } } diff --git a/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Creating_A_Wrap_Without_A_Factory.cs b/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Creating_A_Wrap_Without_A_Factory.cs index 3ad9ec69c8..ec81d0b822 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Creating_A_Wrap_Without_A_Factory.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Creating_A_Wrap_Without_A_Factory.cs @@ -1,4 +1,5 @@ using System.Text.Json; +using System.Threading.Tasks; using FluentAssertions; using Paramore.Brighter.Core.Tests.MessageSerialisation.Test_Doubles; using Xunit; @@ -26,7 +27,7 @@ public TransformPipelineMissingFactoryWrapTests() } [Fact] - public void When_Creating_A_Wrap_Without_A_Factory() + public async Task When_Creating_A_Wrap_Without_A_Factory() { //act _transformPipeline = _pipelineBuilder.BuildWrapPipeline(); @@ -35,7 +36,7 @@ public void When_Creating_A_Wrap_Without_A_Factory() TraceFilters().ToString().Should().Be("MyTransformableCommandMessageMapper"); //wrap should just do message mapper - var message = _transformPipeline.WrapAsync(_myCommand).Result; + var message = await _transformPipeline.WrapAsync(_myCommand); //assert message.Body.Value.Should().Be(JsonSerializer.Serialize(_myCommand, new JsonSerializerOptions(JsonSerializerDefaults.General)).ToString()); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Creating_An_Unwrap_Without_A_Factory.cs b/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Creating_An_Unwrap_Without_A_Factory.cs index e243d8bc27..d7389255aa 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Creating_An_Unwrap_Without_A_Factory.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Creating_An_Unwrap_Without_A_Factory.cs @@ -1,5 +1,6 @@ using System; using System.Text.Json; +using System.Threading.Tasks; using FluentAssertions; using Paramore.Brighter.Core.Tests.MessageSerialisation.Test_Doubles; using Xunit; @@ -33,7 +34,7 @@ public TransformPipelineMissingFactoryUnwrapTests() } [Fact] - public void When_Creating_An_Unwrap_Without_A_Factory() + public async Task When_Creating_An_Unwrap_Without_A_Factory() { //act _transformPipeline = _pipelineBuilder.BuildUnwrapPipeline(); @@ -42,7 +43,7 @@ public void When_Creating_An_Unwrap_Without_A_Factory() TraceFilters().ToString().Should().Be("MyTransformableCommandMessageMapper"); //wrap should just do message mapper - var request = _transformPipeline.UnwrapAsync(_message).Result; + var request = await _transformPipeline.UnwrapAsync(_message); //assert request.Value = _myCommand.Value; diff --git a/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Unwrapping_A_Message_Mapper.cs b/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Unwrapping_A_Message_Mapper.cs index a3377e1522..f0fc01ab7d 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Unwrapping_A_Message_Mapper.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Unwrapping_A_Message_Mapper.cs @@ -1,5 +1,6 @@ using System; using System.Text.Json; +using System.Threading.Tasks; using Paramore.Brighter.Core.Tests.MessageSerialisation.Test_Doubles; using Xunit; @@ -35,11 +36,11 @@ public MessageUnwrapRequestTests() } [Fact] - public void When_Unwrapping_A_Message_Mapper() + public async Task When_Unwrapping_A_Message_Mapper() { //act _transformPipeline = _pipelineBuilder.BuildUnwrapPipeline(); - var request = _transformPipeline.UnwrapAsync(_message).Result; + var request = await _transformPipeline.UnwrapAsync(_message); //assert request.Value = MySimpleTransformAsync.HEADER_KEY; diff --git a/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Unwrapping_A_Message_Mapper_With_Parameters.cs b/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Unwrapping_A_Message_Mapper_With_Parameters.cs index 2521aa8508..caba139499 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Unwrapping_A_Message_Mapper_With_Parameters.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Unwrapping_A_Message_Mapper_With_Parameters.cs @@ -1,5 +1,6 @@ using System; using System.Text.Json; +using System.Threading.Tasks; using FluentAssertions; using Paramore.Brighter.Core.Tests.MessageSerialisation.Test_Doubles; using Xunit; @@ -34,11 +35,11 @@ public MessageUnwrapRequestWithAttributesTests() } [Fact] - public void When_Wrapping_A_Message_Mapper_With_Attributes() + public async Task When_Wrapping_A_Message_Mapper_With_Attributes() { //act _transformPipeline = _pipelineBuilder.BuildUnwrapPipeline(); - var request = _transformPipeline.UnwrapAsync(_message).Result; + var request = await _transformPipeline.UnwrapAsync(_message); //assert request.Value.Should().Be("I am a parameterized template: Hello World"); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Unwrapping_A_Vanilla_Message_Mapper.cs b/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Unwrapping_A_Vanilla_Message_Mapper.cs index 3f7cbf9b1f..e2e6b92d35 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Unwrapping_A_Vanilla_Message_Mapper.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Unwrapping_A_Vanilla_Message_Mapper.cs @@ -1,5 +1,6 @@ using System; using System.Text.Json; +using System.Threading.Tasks; using Paramore.Brighter.Core.Tests.MessageSerialisation.Test_Doubles; using Xunit; @@ -36,11 +37,11 @@ public VanillaMessageUnwrapRequestTests() } [Fact] - public void When_Unwrapping_A_Vanilla_Message_Mapper() + public async Task When_Unwrapping_A_Vanilla_Message_Mapper() { //act _transformPipeline = _pipelineBuilder.BuildUnwrapPipeline(); - var request = _transformPipeline.UnwrapAsync(_message).Result; + var request = await _transformPipeline.UnwrapAsync(_message); //assert request.Value = _myCommand.Value; diff --git a/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Wrapping_A_Message_Mapper.cs b/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Wrapping_A_Message_Mapper.cs index f56b4805eb..633e400807 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Wrapping_A_Message_Mapper.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Wrapping_A_Message_Mapper.cs @@ -1,4 +1,5 @@ using System.Text.Json; +using System.Threading.Tasks; using FluentAssertions; using Paramore.Brighter.Core.Tests.MessageSerialisation.Test_Doubles; using Xunit; @@ -28,11 +29,11 @@ public MessageWrapRequestTests() } [Fact] - public void When_Wrapping_A_Message_Mapper() + public async Task When_Wrapping_A_Message_Mapper() { //act _transformPipeline = _pipelineBuilder.BuildWrapPipeline(); - var message = _transformPipeline.WrapAsync(_myCommand).Result; + var message = await _transformPipeline.WrapAsync(_myCommand); //assert message.Body.Value.Should().Be(JsonSerializer.Serialize(_myCommand, new JsonSerializerOptions(JsonSerializerDefaults.General)).ToString()); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Wrapping_A_Message_Mapper_With_Parameters.cs b/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Wrapping_A_Message_Mapper_With_Parameters.cs index 35da9a7126..3c17112420 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Wrapping_A_Message_Mapper_With_Parameters.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Wrapping_A_Message_Mapper_With_Parameters.cs @@ -1,4 +1,5 @@ using System.Text.Json; +using System.Threading.Tasks; using FluentAssertions; using Paramore.Brighter.Core.Tests.MessageSerialisation.Test_Doubles; using Xunit; @@ -28,11 +29,11 @@ public MessageWrapRequestWithAttributesTests() } [Fact] - public void When_Wrapping_A_Message_Mapper_With_Attributes() + public async Task When_Wrapping_A_Message_Mapper_With_Attributes() { //act _transformPipeline = _pipelineBuilder.BuildWrapPipeline(); - var message = _transformPipeline.WrapAsync(_myCommand).Result; + var message = await _transformPipeline.WrapAsync(_myCommand); //assert message.Body.Value.Should().Be(JsonSerializer.Serialize(_myCommand, new JsonSerializerOptions(JsonSerializerDefaults.General)).ToString()); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Wrapping_A_Vanilla_Message_Mapper.cs b/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Wrapping_A_Vanilla_Message_Mapper.cs index b77be575d3..b835a613e0 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Wrapping_A_Vanilla_Message_Mapper.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Wrapping_A_Vanilla_Message_Mapper.cs @@ -1,4 +1,5 @@ using System.Text.Json; +using System.Threading.Tasks; using FluentAssertions; using Paramore.Brighter.Core.Tests.MessageSerialisation.Test_Doubles; using Xunit; @@ -28,11 +29,11 @@ public VanillaMessageWrapRequestTests() } [Fact] - public void When_Wrapping_A_Vanilla_Message_Mapper() + public async Task When_Wrapping_A_Vanilla_Message_Mapper() { //act _transformPipeline = _pipelineBuilder.BuildWrapPipeline(); - var message = _transformPipeline.WrapAsync(_myCommand).Result; + var message = await _transformPipeline.WrapAsync(_myCommand); //assert message.Body.Value.Should().Be(JsonSerializer.Serialize(_myCommand, new JsonSerializerOptions(JsonSerializerDefaults.General)).ToString()); diff --git a/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Wrapping_Clean_Up_The_Pipeline.cs b/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Wrapping_Clean_Up_The_Pipeline.cs index 83ea55a0a2..e392812010 100644 --- a/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Wrapping_Clean_Up_The_Pipeline.cs +++ b/tests/Paramore.Brighter.Core.Tests/MessageSerialisation/When_Wrapping_Clean_Up_The_Pipeline.cs @@ -1,5 +1,6 @@ using System; using System.Text.Json; +using System.Threading.Tasks; using FluentAssertions; using Paramore.Brighter.Core.Tests.MessageSerialisation.Test_Doubles; using Xunit; @@ -28,11 +29,11 @@ public MessageWrapCleanupTests() } [Fact] - public void When_Wrapping_Clean_Up_The_Pipeline() + public async Task When_Wrapping_Clean_Up_The_Pipeline() { //act _transformPipeline = _pipelineBuilder.BuildWrapPipeline(); - var message = _transformPipeline.WrapAsync(_myCommand).Result; + var message = await _transformPipeline.WrapAsync(_myCommand); _transformPipeline.Dispose(); //assert @@ -40,7 +41,6 @@ public void When_Wrapping_Clean_Up_The_Pipeline() } - private class MyReleaseTrackingTransformFactory : IAmAMessageTransformerFactory { public IAmAMessageTransformAsync Create(Type transformerType) diff --git a/tests/Paramore.Brighter.DynamoDB.Tests/Outbox/When_there_are_outstanding_messages_in_the_outbox.cs b/tests/Paramore.Brighter.DynamoDB.Tests/Outbox/When_there_are_outstanding_messages_in_the_outbox.cs index fdf4c6938a..cc1463248b 100644 --- a/tests/Paramore.Brighter.DynamoDB.Tests/Outbox/When_there_are_outstanding_messages_in_the_outbox.cs +++ b/tests/Paramore.Brighter.DynamoDB.Tests/Outbox/When_there_are_outstanding_messages_in_the_outbox.cs @@ -39,11 +39,11 @@ public async Task When_there_are_outstanding_messages_in_the_outbox_async() } [Fact] - public void When_there_are_outstanding_messages_in_the_outbox() + public async Task When_there_are_outstanding_messages_in_the_outbox() { _dynamoDbOutbox.Add(_message); - Task.Delay(1000).Wait(); + await Task.Delay(1000); var args = new Dictionary {{"Topic", "test_topic"}}; diff --git a/tests/Paramore.Brighter.EventStore.Tests/Outbox/When_there_is_an_outstanding_message_in_the_outbox.cs b/tests/Paramore.Brighter.EventStore.Tests/Outbox/When_there_is_an_outstanding_message_in_the_outbox.cs index 1d2b318399..dcbbd1165a 100644 --- a/tests/Paramore.Brighter.EventStore.Tests/Outbox/When_there_is_an_outstanding_message_in_the_outbox.cs +++ b/tests/Paramore.Brighter.EventStore.Tests/Outbox/When_there_is_an_outstanding_message_in_the_outbox.cs @@ -38,7 +38,7 @@ namespace Paramore.Brighter.EventStore.Tests.Outbox public class OutStandingMessageTests : EventStoreFixture { [Fact] - public void When_there_is_an_outstanding_message_in_the_outbox() + public async void When_there_is_an_outstanding_message_in_the_outbox() { // arrange var eventStoreOutbox = new EventStoreOutboxSync(Connection); @@ -68,7 +68,7 @@ public void When_there_is_an_outstanding_message_in_the_outbox() eventStoreOutbox.Add(outstandingMessage); eventStoreOutbox.Add(dispatchedMessage); - Task.Delay(1000).Wait(); + await Task.Delay(1000); eventStoreOutbox.MarkDispatched(dispatchedMessage.Id, DateTime.UtcNow, args); eventStoreOutbox.Add(outstandingRecentMessage); diff --git a/tests/Paramore.Brighter.InMemory.Tests/Outbox/When_storing_message_in_outbox.cs b/tests/Paramore.Brighter.InMemory.Tests/Outbox/When_storing_message_in_outbox.cs index b6fab17928..a845f485b6 100644 --- a/tests/Paramore.Brighter.InMemory.Tests/Outbox/When_storing_message_in_outbox.cs +++ b/tests/Paramore.Brighter.InMemory.Tests/Outbox/When_storing_message_in_outbox.cs @@ -128,7 +128,7 @@ public void When_there_are_multiple_items_retrieve_by_id() } [Fact] - public void When_there_are_multiple_items_and_some_are_dispatched() + public async Task When_there_are_multiple_items_and_some_are_dispatched() { //Arrange var outbox = new InMemoryOutbox(); @@ -142,7 +142,7 @@ public void When_there_are_multiple_items_and_some_are_dispatched() outbox.MarkDispatched(messageIds[0], now); outbox.MarkDispatched(messageIds[4], now); - Task.Delay(500).Wait(); + await Task.Delay(500); var sentMessages = outbox.DispatchedMessages(5000); var outstandingMessages = outbox.OutstandingMessages(0); From bb9623b00be66829667c5b09517c4bc7ced4b3b1 Mon Sep 17 00:00:00 2001 From: Tim Salva Date: Mon, 25 Sep 2023 09:25:31 +0100 Subject: [PATCH 19/41] Add random sharding for the DynamoDb outbox (#2813) * Start to add random sharding for the DynamoDb outbox * Limit to 20 shards and remove semaphores --------- Co-authored-by: Ian Cooper --- .../DynamoDbConfiguration.cs | 16 +++- .../DynamoDbOutbox.cs | 96 ++++++++++++++----- .../KeyTopicCreatedTimeExpression.cs | 6 +- .../MessageItem.cs | 16 +++- 4 files changed, 101 insertions(+), 33 deletions(-) diff --git a/src/Paramore.Brighter.Outbox.DynamoDB/DynamoDbConfiguration.cs b/src/Paramore.Brighter.Outbox.DynamoDB/DynamoDbConfiguration.cs index c2db2af069..58a3929e49 100644 --- a/src/Paramore.Brighter.Outbox.DynamoDB/DynamoDbConfiguration.cs +++ b/src/Paramore.Brighter.Outbox.DynamoDB/DynamoDbConfiguration.cs @@ -32,13 +32,23 @@ public class DynamoDbConfiguration /// Timeout in milliseconds /// public int Timeout { get; } + /// + /// Number of shards to use for the outstanding index. Maximum of 20 + /// + public int NumberOfShards { get; } + /// + /// Optional time to live for the messages in the outbox + /// By default, messages will not expire + /// + public TimeSpan? TimeToLive { get; set; } [Obsolete("Use the DynamoDbConfiguration without AWSCredentials and without RegionEndpoint")] public DynamoDbConfiguration( AWSCredentials credentials, RegionEndpoint region, string tableName = null, - int timeout = 500) + int timeout = 500, + int numberOfShards = 3) { Credentials = credentials; Region = region; @@ -46,14 +56,16 @@ public DynamoDbConfiguration( OutstandingIndexName = "Outstanding"; DeliveredIndexName = "Delivered"; Timeout = timeout; + NumberOfShards = numberOfShards; } - public DynamoDbConfiguration(string tableName = null, int timeout = 500) + public DynamoDbConfiguration(string tableName = null, int timeout = 500, int numberOfShards = 3) { TableName = tableName ?? "brighter_outbox"; OutstandingIndexName = "Outstanding"; DeliveredIndexName = "Delivered"; Timeout = timeout; + NumberOfShards = numberOfShards; } } } diff --git a/src/Paramore.Brighter.Outbox.DynamoDB/DynamoDbOutbox.cs b/src/Paramore.Brighter.Outbox.DynamoDB/DynamoDbOutbox.cs index d27e6f7804..f41be03e0b 100644 --- a/src/Paramore.Brighter.Outbox.DynamoDB/DynamoDbOutbox.cs +++ b/src/Paramore.Brighter.Outbox.DynamoDB/DynamoDbOutbox.cs @@ -26,6 +26,7 @@ THE SOFTWARE. */ using System; using System.Collections.Generic; using System.Linq; +using System.Security.Cryptography; using System.Threading; using System.Threading.Tasks; using Amazon.DynamoDBv2; @@ -43,6 +44,7 @@ public class DynamoDbOutbox : private readonly DynamoDbConfiguration _configuration; private readonly DynamoDBContext _context; private readonly DynamoDBOperationConfig _dynamoOverwriteTableConfig; + private readonly Random _random = new Random(); public bool ContinueOnCapturedContext { get; set; } @@ -55,7 +57,16 @@ public DynamoDbOutbox(IAmazonDynamoDB client, DynamoDbConfiguration configuratio { _configuration = configuration; _context = new DynamoDBContext(client); - _dynamoOverwriteTableConfig = new DynamoDBOperationConfig { OverrideTableName = _configuration.TableName }; + _dynamoOverwriteTableConfig = new DynamoDBOperationConfig + { + OverrideTableName = _configuration.TableName, + ConsistentRead = true + }; + + if (_configuration.NumberOfShards > 20) + { + throw new ArgumentOutOfRangeException(nameof(DynamoDbConfiguration.NumberOfShards), "Maximum number of shards is 20"); + } } /// @@ -68,6 +79,11 @@ public DynamoDbOutbox(DynamoDBContext context, DynamoDbConfiguration configurati _context = context; _configuration = configuration; _dynamoOverwriteTableConfig = new DynamoDBOperationConfig { OverrideTableName = _configuration.TableName }; + + if (_configuration.NumberOfShards > 20) + { + throw new ArgumentOutOfRangeException(nameof(DynamoDbConfiguration.NumberOfShards), "Maximum number of shards is 20"); + } } /// @@ -90,7 +106,9 @@ public void Add(Message message, int outBoxTimeout = -1, IAmABoxTransactionConne /// Allows the sender to cancel the request pipeline. Optional public async Task AddAsync(Message message, int outBoxTimeout = -1, CancellationToken cancellationToken = default, IAmABoxTransactionConnectionProvider transactionConnectionProvider = null) { - var messageToStore = new MessageItem(message); + var shard = GetShardNumber(); + var expiresAt = GetExpirationTime(); + var messageToStore = new MessageItem(message, shard, expiresAt); if (transactionConnectionProvider != null) { @@ -311,19 +329,8 @@ public IEnumerable OutstandingMessages( var dispatchedTime = now.Subtract(TimeSpan.FromMilliseconds(millisecondsDispatchedSince)); var topic = (string)args["Topic"]; - // We get all the messages for topic, added within a time range - // There should be few enough of those that we can efficiently filter for those - // that don't have a delivery date. - var queryConfig = new QueryOperationConfig - { - IndexName = _configuration.OutstandingIndexName, - KeyExpression = new KeyTopicCreatedTimeExpression().Generate(topic, dispatchedTime), - FilterExpression = new NoDispatchTimeExpression().Generate(), - ConsistentRead = false - }; - //block async to make this sync - var messages = PageAllMessagesAsync(queryConfig).Result.ToList(); + var messages = QueryAllOutstandingShardsAsync(topic, dispatchedTime).Result.ToList(); return messages.Select(msg => msg.ConvertToMessage()); } @@ -357,19 +364,8 @@ public async Task> OutstandingMessagesAsync( var minimumAge = DateTime.UtcNow.Subtract(TimeSpan.FromMilliseconds(millisecondsDispatchedSince)); var topic = (string)args["Topic"]; - // We get all the messages for topic, added within a time range - // There should be few enough of those that we can efficiently filter for those - // that don't have a delivery date. - var queryConfig = new QueryOperationConfig - { - IndexName = _configuration.OutstandingIndexName, - KeyExpression = new KeyTopicCreatedTimeExpression().Generate(topic, minimumAge), - FilterExpression = new NoDispatchTimeExpression().Generate(), - ConsistentRead = false - }; - //block async to make this sync - var messages = (await PageAllMessagesAsync(queryConfig, cancellationToken)).ToList(); + var messages = (await QueryAllOutstandingShardsAsync(topic, minimumAge, cancellationToken)).ToList(); return messages.Select(msg => msg.ConvertToMessage()); } @@ -413,6 +409,34 @@ private async Task> PageAllMessagesAsync(QueryOperation return messages; } + + private async Task> QueryAllOutstandingShardsAsync(string topic, DateTime minimumAge, CancellationToken cancellationToken = default) + { + var tasks = new List>>(); + + for (int shard = 0; shard < _configuration.NumberOfShards; shard++) + { + // We get all the messages for topic, added within a time range + // There should be few enough of those that we can efficiently filter for those + // that don't have a delivery date. + var queryConfig = new QueryOperationConfig + { + IndexName = _configuration.OutstandingIndexName, + KeyExpression = new KeyTopicCreatedTimeExpression().Generate(topic, minimumAge, shard), + FilterExpression = new NoDispatchTimeExpression().Generate(), + ConsistentRead = false + }; + + tasks.Add(PageAllMessagesAsync(queryConfig, cancellationToken)); + } + + await Task.WhenAll(tasks); + + return tasks + .SelectMany(x => x.Result) + .OrderBy(x => x.CreatedAt); + } + private async Task WriteMessageToOutbox(CancellationToken cancellationToken, MessageItem messageToStore) { await _context.SaveAsync( @@ -421,5 +445,25 @@ await _context.SaveAsync( cancellationToken) .ConfigureAwait(ContinueOnCapturedContext); } + + private int GetShardNumber() + { + if (_configuration.NumberOfShards <= 0) + { + return 0; + } + + return _random.Next(0, _configuration.NumberOfShards); + } + + private long? GetExpirationTime() + { + if (_configuration.TimeToLive.HasValue) + { + return DateTimeOffset.UtcNow.Add(_configuration.TimeToLive.Value).ToUnixTimeSeconds(); + } + + return null; + } } } diff --git a/src/Paramore.Brighter.Outbox.DynamoDB/KeyTopicCreatedTimeExpression.cs b/src/Paramore.Brighter.Outbox.DynamoDB/KeyTopicCreatedTimeExpression.cs index 5c049d6efe..88d65d10b9 100644 --- a/src/Paramore.Brighter.Outbox.DynamoDB/KeyTopicCreatedTimeExpression.cs +++ b/src/Paramore.Brighter.Outbox.DynamoDB/KeyTopicCreatedTimeExpression.cs @@ -10,7 +10,7 @@ internal class KeyTopicCreatedTimeExpression public KeyTopicCreatedTimeExpression() { - _expression = new Expression { ExpressionStatement = "Topic = :v_Topic and CreatedTime < :v_CreatedTime" }; + _expression = new Expression { ExpressionStatement = "TopicShard = :v_TopicShard and CreatedTime < :v_CreatedTime" }; } public override string ToString() @@ -18,10 +18,10 @@ public override string ToString() return _expression.ExpressionStatement; } - public Expression Generate(string topicName, DateTime createdTime) + public Expression Generate(string topicName, DateTime createdTime, int shard) { var values = new Dictionary(); - values.Add(":v_Topic", topicName); + values.Add(":v_TopicShard", $"{topicName}_{shard}"); values.Add(":v_CreatedTime", createdTime.Ticks); _expression.ExpressionAttributeValues = values; diff --git a/src/Paramore.Brighter.Outbox.DynamoDB/MessageItem.cs b/src/Paramore.Brighter.Outbox.DynamoDB/MessageItem.cs index 21cb25259e..32afa80fcf 100644 --- a/src/Paramore.Brighter.Outbox.DynamoDB/MessageItem.cs +++ b/src/Paramore.Brighter.Outbox.DynamoDB/MessageItem.cs @@ -92,9 +92,19 @@ public class MessageItem /// The Topic the message was published to /// /// - [DynamoDBGlobalSecondaryIndexHashKey("Delivered", "Outstanding")] + [DynamoDBGlobalSecondaryIndexHashKey("Delivered")] [DynamoDBProperty] public string Topic { get; set; } + + /// + /// The Topic suffixed with the shard number + /// + [DynamoDBGlobalSecondaryIndexHashKey("Outstanding")] + [DynamoDBProperty] + public string TopicShard { get; set; } + + [DynamoDBProperty] + public long? ExpiresAt { get; set; } public MessageItem() @@ -102,7 +112,7 @@ public MessageItem() /*Deserialization*/ } - public MessageItem(Message message) + public MessageItem(Message message, int shard = 0, long? expiresAt = null) { var date = message.Header.TimeStamp == DateTime.MinValue ? DateTime.UtcNow : message.Header.TimeStamp; @@ -119,6 +129,8 @@ public MessageItem(Message message) PartitionKey = message.Header.PartitionKey; ReplyTo = message.Header.ReplyTo; Topic = message.Header.Topic; + TopicShard = $"{Topic}_{shard}"; + ExpiresAt = expiresAt; } public Message ConvertToMessage() From b7a2b99a48bc678ea435753669c23ca50bed1ab6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 09:26:37 +0100 Subject: [PATCH 20/41] chore(deps): bump AWSSDK.SecurityToken from 3.7.201.37 to 3.7.201.39 (#2834) Bumps [AWSSDK.SecurityToken](https://github.com/aws/aws-sdk-net) from 3.7.201.37 to 3.7.201.39. - [Changelog](https://github.com/aws/aws-sdk-net/blob/master/SDK.CHANGELOG.MD) - [Commits](https://github.com/aws/aws-sdk-net/commits) --- updated-dependencies: - dependency-name: AWSSDK.SecurityToken dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ian Cooper --- .../Paramore.Brighter.MessagingGateway.AWSSQS.csproj | 4 ++-- .../Paramore.Brighter.Tranformers.AWS.csproj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj index e13a8e8408..85be8438e7 100644 --- a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj +++ b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj @@ -1,4 +1,4 @@ - + Provides an implementation of the messaging gateway for decoupled invocation in the Paramore.Brighter pipeline, using awssqs Deniz Kocak @@ -9,7 +9,7 @@ - + diff --git a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj index 9d48c60d5c..5f82146c56 100644 --- a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj +++ b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj @@ -19,7 +19,7 @@ - + From 97cb532da4e5fe730a3d7c7b734c5ec414e7be67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 09:27:11 +0100 Subject: [PATCH 21/41] chore(deps): bump AWSSDK.DynamoDBv2 from 3.7.201.12 to 3.7.201.14 (#2835) Bumps [AWSSDK.DynamoDBv2](https://github.com/aws/aws-sdk-net) from 3.7.201.12 to 3.7.201.14. - [Changelog](https://github.com/aws/aws-sdk-net/blob/master/SDK.CHANGELOG.MD) - [Commits](https://github.com/aws/aws-sdk-net/commits) --- updated-dependencies: - dependency-name: AWSSDK.DynamoDBv2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ian Cooper --- .../WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj | 2 +- .../SalutationEntities/SalutationEntities.csproj | 2 +- .../Paramore.Brighter.DynamoDb.csproj | 4 ++-- .../Paramore.Brighter.Inbox.DynamoDB.csproj | 4 ++-- .../Paramore.Brighter.Outbox.DynamoDB.csproj | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj index 57e684caec..7a8ef918d6 100644 --- a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj +++ b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj index 9b6c18e607..155dd60fa0 100644 --- a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj +++ b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj index 75979eca90..33d69e35fa 100644 --- a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj +++ b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj @@ -1,11 +1,11 @@ - + netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj index e67e5e068f..6ace71ee5c 100644 --- a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj @@ -1,9 +1,9 @@ - + netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj index a92854e987..a28c4d075c 100644 --- a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj @@ -1,9 +1,9 @@ - + netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 6830db05e3ac98024aa9e6d1b2decc47a7363b55 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 09:29:16 +0100 Subject: [PATCH 22/41] chore(deps): bump AWSSDK.S3 from 3.7.203.16 to 3.7.204.1 (#2839) Bumps [AWSSDK.S3](https://github.com/aws/aws-sdk-net) from 3.7.203.16 to 3.7.204.1. - [Changelog](https://github.com/aws/aws-sdk-net/blob/master/SDK.CHANGELOG.MD) - [Commits](https://github.com/aws/aws-sdk-net/commits) --- updated-dependencies: - dependency-name: AWSSDK.S3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ian Cooper --- .../Paramore.Brighter.Tranformers.AWS.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj index 5f82146c56..c3901a31e4 100644 --- a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj +++ b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj @@ -18,7 +18,7 @@ - + From 69bce75704d34f9245fc8190d889bc01b3dc4233 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 09:29:58 +0100 Subject: [PATCH 23/41] chore(deps): bump actions/checkout from 3 to 4 (#2801) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ian Cooper --- .github/workflows/ci.yml | 26 +++++++++++++------------- .github/workflows/codeql-analysis.yml | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7e4347841..75e8aea94f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: dotnet-version: | 6.0.x - run: dotnet --info - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: actions/cache@v3 @@ -85,7 +85,7 @@ jobs: needs: [build] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup dotnet 6 uses: actions/setup-dotnet@v3 with: @@ -113,7 +113,7 @@ jobs: --health-retries 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup dotnet 6 uses: actions/setup-dotnet@v3 with: @@ -142,7 +142,7 @@ jobs: --health-retries 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup dotnet 6 uses: actions/setup-dotnet@v3 with: @@ -204,7 +204,7 @@ jobs: - name: docker check run: docker ps -a - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup dotnet 6 uses: actions/setup-dotnet@v3 with: @@ -233,7 +233,7 @@ jobs: --health-timeout 5s --health-retries 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup dotnet 6 uses: actions/setup-dotnet@v3 with: @@ -266,7 +266,7 @@ jobs: EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP: true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup dotnet 6 uses: actions/setup-dotnet@v3 with: @@ -291,7 +291,7 @@ jobs: ACCEPT_EULA: Y SA_PASSWORD: Password1! steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup dotnet 6 uses: actions/setup-dotnet@v3 with: @@ -318,7 +318,7 @@ jobs: options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup dotnet 6 uses: actions/setup-dotnet@v3 with: @@ -348,7 +348,7 @@ jobs: - 8000:8000 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup dotnet 6 uses: actions/setup-dotnet@v3 with: @@ -370,7 +370,7 @@ jobs: AWS_DEFAULT_OUTPUT: json steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup dotnet 6 uses: actions/setup-dotnet@v3 with: @@ -396,7 +396,7 @@ jobs: needs: [ build ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup dotnet 6 uses: actions/setup-dotnet@v3 with: @@ -412,7 +412,7 @@ jobs: timeout-minutes: 5 needs: [build] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup dotnet 6 uses: actions/setup-dotnet@v3 with: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9e7c5a16f7..9c76ad33dc 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -35,7 +35,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup dotnet 6.0.x uses: actions/setup-dotnet@v3 From 7c3c2e5cc1e418ef4ad6e09731eaffdf7783a9f1 Mon Sep 17 00:00:00 2001 From: Ian Cooper Date: Mon, 25 Sep 2023 21:15:58 +0100 Subject: [PATCH 24/41] Patch Tuesday --- .../GreetingsEntities/GreetingsEntities.csproj | 2 +- .../SalutationEntities/SalutationEntities.csproj | 2 +- .../Paramore.Brighter.DynamoDb.csproj | 2 +- .../Paramore.Brighter.Inbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.MessagingGateway.AWSSQS.csproj | 6 +++--- .../Paramore.Brighter.Outbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.Tranformers.AWS.csproj | 2 +- .../Paramore.Brighter.Azure.Tests.csproj | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj index 7a8ef918d6..2fd0743526 100644 --- a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj +++ b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj index 155dd60fa0..3665e88f83 100644 --- a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj +++ b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj index 33d69e35fa..2c316889c7 100644 --- a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj +++ b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj @@ -5,7 +5,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj index 6ace71ee5c..205e7c2785 100644 --- a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj index 85be8438e7..42bc82357a 100644 --- a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj +++ b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj @@ -9,11 +9,11 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj index a28c4d075c..c2af3f5d0a 100644 --- a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj index c3901a31e4..ed0b140851 100644 --- a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj +++ b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj @@ -19,7 +19,7 @@ - + diff --git a/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj b/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj index 04f8af8a56..9af4c2555e 100644 --- a/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj +++ b/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj @@ -14,7 +14,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From af41769b2491663f694b1ac8e56f6934e055102e Mon Sep 17 00:00:00 2001 From: Ian Cooper Date: Mon, 25 Sep 2023 21:32:34 +0100 Subject: [PATCH 25/41] Fix issue with nullable types and DynamoDb Table Factory --- src/Paramore.Brighter.DynamoDb/DynamoDbTableFactory.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Paramore.Brighter.DynamoDb/DynamoDbTableFactory.cs b/src/Paramore.Brighter.DynamoDb/DynamoDbTableFactory.cs index 5cadb7c418..e135a252a5 100644 --- a/src/Paramore.Brighter.DynamoDb/DynamoDbTableFactory.cs +++ b/src/Paramore.Brighter.DynamoDb/DynamoDbTableFactory.cs @@ -338,13 +338,19 @@ private static void UpdateGSIMapWithRangeKey(Dictionary)) + { + var baseType = Nullable.GetUnderlyingType(propertyType); + return GetDynamoDbType(baseType, hasConverter); + } + if (propertyType == typeof(string)) { return ScalarAttributeType.S; @@ -384,7 +390,7 @@ private ScalarAttributeType GetDynamoDbType(Type propertyType, bool hasonverter) return new ScalarAttributeType("M"); } - if (hasonverter) + if (hasConverter) { //at this point we can't tie you to something we understand, so if you have a custom converter //let's assume that you store it to a string From f12e61f4acbf6bd1fb926de833cd76ce1854a822 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 21:33:52 +0100 Subject: [PATCH 26/41] chore(deps): bump dotnet-ef from 7.0.10 to 7.0.11 (#2840) Bumps [dotnet-ef](https://github.com/dotnet/efcore) from 7.0.10 to 7.0.11. - [Release notes](https://github.com/dotnet/efcore/releases) - [Commits](https://github.com/dotnet/efcore/compare/v7.0.10...v7.0.11) --- updated-dependencies: - dependency-name: dotnet-ef dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ian Cooper --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 558293e1d9..96be437d5d 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "dotnet-ef": { - "version": "7.0.10", + "version": "7.0.11", "commands": [ "dotnet-ef" ] From c305932c912099878c8acf7c6dd834d20e392f75 Mon Sep 17 00:00:00 2001 From: Tim Salva Date: Tue, 26 Sep 2023 08:20:34 +0100 Subject: [PATCH 27/41] Enable DynamoDbInbox configuration (#2838) Co-authored-by: Ian Cooper --- .../SalutationAnalytics/Program.cs | 6 +++--- .../DynamoDbInbox.cs | 18 +++++++++++------- .../DynamoDbInboxConfiguration.cs | 11 +++++++++-- .../DynamoDbInboxDuplicateMessageTests.cs | 2 +- .../When_checking_for_existing_command.cs | 2 +- ...When_checking_for_existing_command_async.cs | 2 +- ...he_message_is_already_in_the_inbox_async.cs | 2 +- ..._there_is_no_message_in_the_dynamo_inbox.cs | 2 +- ..._is_no_message_in_the_dynamo_inbox_async.cs | 2 +- .../When_writing_a_message_to_the_inbox.cs | 2 +- ...hen_writing_a_message_to_the_inbox_async.cs | 2 +- 11 files changed, 31 insertions(+), 20 deletions(-) diff --git a/samples/WebAPI_Dynamo/SalutationAnalytics/Program.cs b/samples/WebAPI_Dynamo/SalutationAnalytics/Program.cs index 15cb7c7b57..7c7ef23f26 100644 --- a/samples/WebAPI_Dynamo/SalutationAnalytics/Program.cs +++ b/samples/WebAPI_Dynamo/SalutationAnalytics/Program.cs @@ -116,7 +116,7 @@ private static void ConfigureBrighter( ) .AutoFromAssemblies() .UseExternalInbox( - ConfigureInbox(dynamoDb), + ConfigureInbox(awsCredentials, dynamoDb), new InboxConfiguration( scope: InboxScope.Commands, onceOnly: true, @@ -235,9 +235,9 @@ private static void CreateInbox(IAmazonDynamoDB client, IServiceCollection servi } } - private static IAmAnInbox ConfigureInbox(IAmazonDynamoDB dynamoDb) + private static IAmAnInbox ConfigureInbox(AWSCredentials credentials, IAmazonDynamoDB dynamoDb) { - return new DynamoDbInbox(dynamoDb); + return new DynamoDbInbox(dynamoDb, new DynamoDbInboxConfiguration(credentials, RegionEndpoint.EUWest1)); } private static IAmAnOutbox ConfigureOutbox(AWSCredentials credentials, IAmazonDynamoDB dynamoDb) diff --git a/src/Paramore.Brighter.Inbox.DynamoDB/DynamoDbInbox.cs b/src/Paramore.Brighter.Inbox.DynamoDB/DynamoDbInbox.cs index 848e4e1dd4..8564eb0d5b 100644 --- a/src/Paramore.Brighter.Inbox.DynamoDB/DynamoDbInbox.cs +++ b/src/Paramore.Brighter.Inbox.DynamoDB/DynamoDbInbox.cs @@ -37,8 +37,8 @@ namespace Paramore.Brighter.Inbox.DynamoDB { public class DynamoDbInbox : IAmAnInboxSync, IAmAnInboxAsync { - - private readonly DynamoDBContext _context; + private readonly DynamoDBContext _context; + private readonly DynamoDBOperationConfig _dynamoOverwriteTableConfig; public bool ContinueOnCapturedContext { get; set; } @@ -48,9 +48,13 @@ public class DynamoDbInbox : IAmAnInboxSync, IAmAnInboxAsync /// The DynamoDBContext /// The DynamoDB Operation Configuration /// The Amazon Dynamo Db client to use - public DynamoDbInbox(IAmazonDynamoDB client ) + public DynamoDbInbox(IAmazonDynamoDB client, DynamoDbInboxConfiguration configuration) { _context = new DynamoDBContext(client); + _dynamoOverwriteTableConfig = new DynamoDBOperationConfig + { + OverrideTableName = configuration.TableName + }; } /// @@ -95,7 +99,7 @@ public T Get(Guid id, string contextKey, int timeoutInMilliseconds = -1) wher public async Task AddAsync(T command, string contextKey, int timeoutInMilliseconds = -1, CancellationToken cancellationToken = default) where T : class, IRequest { await _context - .SaveAsync(new CommandItem(command, contextKey), cancellationToken) + .SaveAsync(new CommandItem(command, contextKey), _dynamoOverwriteTableConfig, cancellationToken) .ConfigureAwait(false); } @@ -127,7 +131,7 @@ public async Task ExistsAsync(Guid id, string contextKey, int timeoutIn try { var command = await GetCommandAsync(id, contextKey, cancellationToken).ConfigureAwait(false); - return command !=null; + return command != null; } catch (RequestNotFoundException) { @@ -161,7 +165,7 @@ private async Task GetCommandAsync(Guid id, string contextKey, Cancellatio var messages = await PageAllMessagesAsync(queryConfig).ConfigureAwait(false); var result = messages.Select(msg => msg.ConvertToCommand()).FirstOrDefault(); - if ( result == null) + if (result == null) throw new RequestNotFoundException(id); return result; @@ -170,7 +174,7 @@ private async Task GetCommandAsync(Guid id, string contextKey, Cancellatio private async Task>> PageAllMessagesAsync(QueryOperationConfig queryConfig) where T: class, IRequest { - var asyncSearch = _context.FromQueryAsync>(queryConfig); + var asyncSearch = _context.FromQueryAsync>(queryConfig, _dynamoOverwriteTableConfig); var messages = new List>(); do diff --git a/src/Paramore.Brighter.Inbox.DynamoDB/DynamoDbInboxConfiguration.cs b/src/Paramore.Brighter.Inbox.DynamoDB/DynamoDbInboxConfiguration.cs index b5cac66493..564ceba60e 100644 --- a/src/Paramore.Brighter.Inbox.DynamoDB/DynamoDbInboxConfiguration.cs +++ b/src/Paramore.Brighter.Inbox.DynamoDB/DynamoDbInboxConfiguration.cs @@ -22,6 +22,7 @@ THE SOFTWARE. */ #endregion +using System; using Amazon; using Amazon.Runtime; @@ -43,14 +44,20 @@ public class DynamoDbInboxConfiguration /// public string TableName { get; set; } + [Obsolete("Use the DynamoDbConfiguration without AWSCredentials and without RegionEndpoint")] public DynamoDbInboxConfiguration( AWSCredentials credentials, RegionEndpoint region, - string tableName) + string tableName = null) { Credentials = credentials; Region = region; - TableName = tableName; + TableName = tableName ?? "brighter_inbox"; + } + + public DynamoDbInboxConfiguration(string tableName = null) + { + TableName = tableName ?? "brighter_inbox"; } } } diff --git a/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/DynamoDbInboxDuplicateMessageTests.cs b/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/DynamoDbInboxDuplicateMessageTests.cs index 4603f655ba..93a37d6a48 100644 --- a/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/DynamoDbInboxDuplicateMessageTests.cs +++ b/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/DynamoDbInboxDuplicateMessageTests.cs @@ -42,7 +42,7 @@ public class DynamoDbInboxDuplicateMessageTests : DynamoDBInboxBaseTest public DynamoDbInboxDuplicateMessageTests() { - _dynamoDbInbox = new DynamoDbInbox(Client); + _dynamoDbInbox = new DynamoDbInbox(Client, new DynamoDbInboxConfiguration()); _raisedCommand = new MyCommand { Value = "Test" }; _contextKey = "context-key"; _dynamoDbInbox.Add(_raisedCommand, _contextKey); diff --git a/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_checking_for_existing_command.cs b/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_checking_for_existing_command.cs index 21f3d3e21c..1505759d68 100644 --- a/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_checking_for_existing_command.cs +++ b/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_checking_for_existing_command.cs @@ -20,7 +20,7 @@ public DynamoDbCommandExistsTests() _command = new MyCommand { Id = _guid, Value = "Test Earliest"}; _contextKey = "test-context-key"; - _dynamoDbInbox = new DynamoDbInbox(Client); + _dynamoDbInbox = new DynamoDbInbox(Client, new DynamoDbInboxConfiguration()); _dynamoDbInbox.Add(_command, _contextKey); } diff --git a/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_checking_for_existing_command_async.cs b/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_checking_for_existing_command_async.cs index fd7eeab1d6..dce3ca9fc5 100644 --- a/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_checking_for_existing_command_async.cs +++ b/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_checking_for_existing_command_async.cs @@ -20,7 +20,7 @@ public DynamoDbCommandExistsAsyncTests() _command = new MyCommand { Id = _guid, Value = "Test Earliest"}; _contextKey = "test-context-key"; - _dynamoDbInbox = new DynamoDbInbox(Client); + _dynamoDbInbox = new DynamoDbInbox(Client, new DynamoDbInboxConfiguration()); _dynamoDbInbox.Add(_command, _contextKey); } diff --git a/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_the_message_is_already_in_the_inbox_async.cs b/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_the_message_is_already_in_the_inbox_async.cs index 397da004fb..3794bbdd0c 100644 --- a/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_the_message_is_already_in_the_inbox_async.cs +++ b/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_the_message_is_already_in_the_inbox_async.cs @@ -41,7 +41,7 @@ public class DynamoDbInboxDuplicateMessageAsyncTests : DynamoDBInboxBaseTest public DynamoDbInboxDuplicateMessageAsyncTests() { - _dynamoDbInbox = new DynamoDbInbox(Client); + _dynamoDbInbox = new DynamoDbInbox(Client, new DynamoDbInboxConfiguration()); _raisedCommand = new MyCommand {Value = "Test"}; _contextKey = "context-key"; diff --git a/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_there_is_no_message_in_the_dynamo_inbox.cs b/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_there_is_no_message_in_the_dynamo_inbox.cs index 8993b3abe1..19d24a42a1 100644 --- a/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_there_is_no_message_in_the_dynamo_inbox.cs +++ b/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_there_is_no_message_in_the_dynamo_inbox.cs @@ -38,7 +38,7 @@ public class DynamoDbInboxEmptyWhenSearchedTests : DynamoDBInboxBaseTest public DynamoDbInboxEmptyWhenSearchedTests() { - _dynamoDbInbox = new DynamoDbInbox(Client); + _dynamoDbInbox = new DynamoDbInbox(Client, new DynamoDbInboxConfiguration()); } [Fact] diff --git a/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_there_is_no_message_in_the_dynamo_inbox_async.cs b/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_there_is_no_message_in_the_dynamo_inbox_async.cs index 61c3ffdedb..f62229fb54 100644 --- a/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_there_is_no_message_in_the_dynamo_inbox_async.cs +++ b/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_there_is_no_message_in_the_dynamo_inbox_async.cs @@ -39,7 +39,7 @@ public class DynamoDbInboxEmptyWhenSearchedAsyncTests : DynamoDBInboxBaseTest public DynamoDbInboxEmptyWhenSearchedAsyncTests() { - _dynamoDbInbox = new DynamoDbInbox(Client); + _dynamoDbInbox = new DynamoDbInbox(Client, new DynamoDbInboxConfiguration()); } [Fact] diff --git a/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_writing_a_message_to_the_inbox.cs b/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_writing_a_message_to_the_inbox.cs index 26f3765846..1c2b48ff32 100644 --- a/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_writing_a_message_to_the_inbox.cs +++ b/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_writing_a_message_to_the_inbox.cs @@ -40,7 +40,7 @@ public class DynamoDbInboxAddMessageTests : DynamoDBInboxBaseTest public DynamoDbInboxAddMessageTests() { - _dynamoDbInbox = new DynamoDbInbox(Client); + _dynamoDbInbox = new DynamoDbInbox(Client, new DynamoDbInboxConfiguration()); _raisedCommand = new MyCommand {Value = "Test"}; _contextKey = "context-key"; diff --git a/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_writing_a_message_to_the_inbox_async.cs b/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_writing_a_message_to_the_inbox_async.cs index c64a6d39d1..3bd452822c 100644 --- a/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_writing_a_message_to_the_inbox_async.cs +++ b/tests/Paramore.Brighter.DynamoDB.Tests/Inbox/When_writing_a_message_to_the_inbox_async.cs @@ -41,7 +41,7 @@ public class DynamoDbInboxAddMessageAsyncTests : DynamoDBInboxBaseTest public DynamoDbInboxAddMessageAsyncTests() { - _dynamoDbInbox = new DynamoDbInbox(Client); + _dynamoDbInbox = new DynamoDbInbox(Client, new DynamoDbInboxConfiguration()); _raisedCommand = new MyCommand { Value = "Test" }; _contextKey = "context-key"; From d04c3f6052c8a26f31fc5356bfc8266e25d2cb8d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 08:36:41 +0100 Subject: [PATCH 28/41] chore(deps): bump aws-actions/configure-aws-credentials from 2 to 3 (#2799) Bumps [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) from 2 to 3. - [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases) - [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md) - [Commits](https://github.com/aws-actions/configure-aws-credentials/compare/v2...v3) --- updated-dependencies: - dependency-name: aws-actions/configure-aws-credentials dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ian Cooper --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75e8aea94f..7e3fb64d8f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -379,7 +379,7 @@ jobs: - name: Install dependencies run: dotnet restore - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v2 + uses: aws-actions/configure-aws-credentials@v3 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} From 9cc5cbc66939a8f68cb95b51f748a6c75efa1e03 Mon Sep 17 00:00:00 2001 From: "Luke S. Phillips" Date: Sun, 8 Oct 2023 17:16:08 +0100 Subject: [PATCH 29/41] Ensured flush token is released if offset commit fails. (#2860) --- .../KafkaMessageConsumer.cs | 48 +++++++++++-------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/src/Paramore.Brighter.MessagingGateway.Kafka/KafkaMessageConsumer.cs b/src/Paramore.Brighter.MessagingGateway.Kafka/KafkaMessageConsumer.cs index ef19d91dad..8332d40dc6 100644 --- a/src/Paramore.Brighter.MessagingGateway.Kafka/KafkaMessageConsumer.cs +++ b/src/Paramore.Brighter.MessagingGateway.Kafka/KafkaMessageConsumer.cs @@ -411,27 +411,33 @@ public int StoredOffsets() /// private void CommitOffsets() { - - var listOffsets = new List(); - for (int i = 0; i < _maxBatchSize; i++) - { - bool hasOffsets = _offsetStorage.TryTake(out var offset); - if (hasOffsets) - listOffsets.Add(offset); - else - break; - - } - - if (s_logger.IsEnabled(LogLevel.Information)) - { - var offsets = listOffsets.Select(tpo => $"Topic: {tpo.Topic} Partition: {tpo.Partition.Value} Offset: {tpo.Offset.Value}"); - var offsetAsString = string.Join(Environment.NewLine, offsets); - s_logger.LogInformation("Commiting offsets: {0} {Offset}", Environment.NewLine, offsetAsString); - } - - _consumer.Commit(listOffsets); - _flushToken.Release(1); + try + { + var listOffsets = new List(); + for (int i = 0; i < _maxBatchSize; i++) + { + bool hasOffsets = _offsetStorage.TryTake(out var offset); + if (hasOffsets) + listOffsets.Add(offset); + else + break; + + } + + if (s_logger.IsEnabled(LogLevel.Information)) + { + var offsets = listOffsets.Select(tpo => + $"Topic: {tpo.Topic} Partition: {tpo.Partition.Value} Offset: {tpo.Offset.Value}"); + var offsetAsString = string.Join(Environment.NewLine, offsets); + s_logger.LogInformation("Commiting offsets: {0} {Offset}", Environment.NewLine, offsetAsString); + } + + _consumer.Commit(listOffsets); + } + finally + { + _flushToken.Release(1); + } } private void CommitAllOffsets(DateTime flushTime) From befd453b5fb433ed53f225dfe3eb82d2c0f68ae3 Mon Sep 17 00:00:00 2001 From: Paul Reardon Date: Tue, 10 Oct 2023 11:52:36 +0100 Subject: [PATCH 30/41] Azure Blob Archive - Storage Pattern (#2861) Add the ability to specify the location and name of the Blobs inside of the container --- .../AzureBlobArchiveProvider.cs | 36 +++++++++++++------ .../AzureBlobArchiveProviderOptions.cs | 5 +++ .../AzureBlobArchiveProviderTests.cs | 17 +++++---- 3 files changed, 42 insertions(+), 16 deletions(-) diff --git a/src/Paramore.Brighter.Archive.Azure/AzureBlobArchiveProvider.cs b/src/Paramore.Brighter.Archive.Azure/AzureBlobArchiveProvider.cs index 21c45fa5bd..cc7a8f7aad 100644 --- a/src/Paramore.Brighter.Archive.Azure/AzureBlobArchiveProvider.cs +++ b/src/Paramore.Brighter.Archive.Azure/AzureBlobArchiveProvider.cs @@ -1,13 +1,16 @@ using Azure.Storage; using Azure.Storage.Blobs; using Azure.Storage.Blobs.Models; +using Microsoft.Extensions.Logging; +using Paramore.Brighter.Logging; namespace Paramore.Brighter.Storage.Azure; public class AzureBlobArchiveProvider : IAmAnArchiveProvider { - private BlobContainerClient _containerClient; + private readonly BlobContainerClient _containerClient; private readonly AzureBlobArchiveProviderOptions _options; + private readonly ILogger _logger = ApplicationLogging.CreateLogger(); public AzureBlobArchiveProvider(AzureBlobArchiveProviderOptions options) { @@ -21,15 +24,18 @@ public AzureBlobArchiveProvider(AzureBlobArchiveProviderOptions options) /// Message to send public void ArchiveMessage(Message message) { - var blobClient = _containerClient.GetBlobClient(message.Id.ToString()); + var blobClient = GetBlobClient(message); var alreadyUploaded = blobClient.Exists(); - if (!alreadyUploaded.Value) + if (alreadyUploaded.Value) { - var opts = GetUploadOptions(message); - blobClient.Upload(BinaryData.FromBytes(message.Body.Bytes), opts); + _logger.LogDebug("Message with Id {MessageId} has already been uploaded", message.Id); + return; } + + var opts = GetUploadOptions(message); + blobClient.Upload(BinaryData.FromBytes(message.Body.Bytes), opts); } /// @@ -39,14 +45,17 @@ public void ArchiveMessage(Message message) /// The Cancellation Token public async Task ArchiveMessageAsync(Message message, CancellationToken cancellationToken) { - var blobClient = _containerClient.GetBlobClient(message.Id.ToString()); + var blobClient = GetBlobClient(message); var alreadyUploaded = await blobClient.ExistsAsync(cancellationToken); - if (!alreadyUploaded.Value) + if (alreadyUploaded.Value) { - var opts = GetUploadOptions(message); - await blobClient.UploadAsync(BinaryData.FromBytes(message.Body.Bytes), opts, cancellationToken); + _logger.LogDebug("Message with Id {MessageId} has already been uploaded", message.Id); + return; } + + var opts = GetUploadOptions(message); + await blobClient.UploadAsync(BinaryData.FromBytes(message.Body.Bytes), opts, cancellationToken); } /// @@ -78,11 +87,18 @@ public async Task ArchiveMessagesAsync(Message[] messages, CancellationT } catch(Exception e) { - + _logger.LogError(e, "Error archiving message with Id {MessageId}", message.Id); return null; } } + private BlobClient GetBlobClient(Message message) + { + var storageLocation = _options.StorageLocationFunc.Invoke(message); + _logger.LogDebug("Uploading Message with Id {MessageId} to {ArchiveLocation}", message.Id, storageLocation); + return _containerClient.GetBlobClient(storageLocation); + } + private BlobUploadOptions GetUploadOptions(Message message) { var opts = new BlobUploadOptions() diff --git a/src/Paramore.Brighter.Archive.Azure/AzureBlobArchiveProviderOptions.cs b/src/Paramore.Brighter.Archive.Azure/AzureBlobArchiveProviderOptions.cs index ff635cbc69..c122fa6624 100644 --- a/src/Paramore.Brighter.Archive.Azure/AzureBlobArchiveProviderOptions.cs +++ b/src/Paramore.Brighter.Archive.Azure/AzureBlobArchiveProviderOptions.cs @@ -46,4 +46,9 @@ public class AzureBlobArchiveProviderOptions { "timestamp", message.Header.TimeStamp.ToString() }, { "content_type", message.Header.ContentType } }; + + /// + /// The function to provide the location to store the message inside of the Blob container + /// + public Func StorageLocationFunc = (message) => $"{message.Id}"; } diff --git a/tests/Paramore.Brighter.Azure.Tests/AzureBlobArchiveProviderTests.cs b/tests/Paramore.Brighter.Azure.Tests/AzureBlobArchiveProviderTests.cs index 1f5b5bf18b..b9fc173856 100644 --- a/tests/Paramore.Brighter.Azure.Tests/AzureBlobArchiveProviderTests.cs +++ b/tests/Paramore.Brighter.Azure.Tests/AzureBlobArchiveProviderTests.cs @@ -19,6 +19,8 @@ public class AzureBlobArchiveProviderTests private Dictionary _topicDirectory; + private Func _storageLocatioFuncion; + [SetUp] public void Setup() { @@ -34,6 +36,8 @@ public void Setup() _commandMapper = new JsonBodyMessageMapper(_topicDirectory); _eventMapper = new JsonBodyMessageMapper(_topicDirectory); + + _storageLocatioFuncion = (message) => $"{message.Header.Topic}/{message.Id}".ToLower(); } [Test] @@ -41,7 +45,7 @@ public async Task GivenARequestToArchiveAMessage_TheMessageIsArchived() { var commandMessage = _commandMapper.MapToMessage(_command); - var blobClient = GetClient(AccessTier.Cool).GetBlobClient(commandMessage.Id.ToString()); + var blobClient = GetClient(AccessTier.Cool).GetBlobClient(_storageLocatioFuncion.Invoke(commandMessage)); _provider.ArchiveMessage(commandMessage); @@ -64,7 +68,7 @@ public async Task GivenARequestToArchiveAMessage_WhenTagsAreTurnedOn_ThenTagsAre { var eventMessage = _eventMapper.MapToMessage(_event); - var blobClient = GetClient(AccessTier.Hot, true).GetBlobClient(eventMessage.Id.ToString()); + var blobClient = GetClient(AccessTier.Hot, true).GetBlobClient(_storageLocatioFuncion.Invoke(eventMessage)); _provider.ArchiveMessage(eventMessage); @@ -85,7 +89,7 @@ public async Task GivenARequestToArchiveAMessageAsync_TheMessageIsArchived() { var commandMessage = _commandMapper.MapToMessage(_command); - var blobClient = GetClient(AccessTier.Cool).GetBlobClient(commandMessage.Id.ToString()); + var blobClient = GetClient(AccessTier.Cool).GetBlobClient(_storageLocatioFuncion.Invoke(commandMessage)); await _provider.ArchiveMessageAsync(commandMessage, CancellationToken.None); @@ -125,7 +129,7 @@ public async Task GivenARequestToArchiveAMessageAsync_WhenParallel_TheMessageIsA foreach (var message in messages) { - var blobClient = containerClient.GetBlobClient(message.Id.ToString()); + var blobClient = containerClient.GetBlobClient(_storageLocatioFuncion.Invoke(message)); Assert.That((bool)await blobClient.ExistsAsync(), Is.True); var tags = (await blobClient.GetTagsAsync()).Value.Tags; @@ -152,7 +156,7 @@ public async Task GivenARequestToArchiveAMessageAsync_WhenTagsAreTurnedOn_ThenTa { var eventMessage = _eventMapper.MapToMessage(_event); - var blobClient = GetClient(AccessTier.Hot, true).GetBlobClient(eventMessage.Id.ToString()); + var blobClient = GetClient(AccessTier.Hot, true).GetBlobClient(_storageLocatioFuncion.Invoke(eventMessage)); await _provider.ArchiveMessageAsync(eventMessage, CancellationToken.None); @@ -183,7 +187,8 @@ private BlobContainerClient GetClient(AccessTier tier , bool tags = false ) { "message_type", message.Header.MessageType.ToString() }, { "timestamp", message.Header.TimeStamp.ToString() }, { "content_type", message.Header.ContentType } - }) + }), + StorageLocationFunc = _storageLocatioFuncion }; _provider = new AzureBlobArchiveProvider(options); From 3022d322d4978d4fa3ac25c32f5ffb9b77a7b11c Mon Sep 17 00:00:00 2001 From: Ian Cooper Date: Tue, 10 Oct 2023 13:02:44 +0200 Subject: [PATCH 31/41] Patch Tuesday --- samples/ASBTaskQueue/Greetings/Greetings.csproj | 2 +- samples/RMQTaskQueue/Greetings/Greetings.csproj | 2 +- samples/WebAPI_Dapper/GreetingsPorts/GreetingsPorts.csproj | 2 +- .../WebAPI_Dapper/SalutationPorts/SalutationPorts.csproj | 2 +- .../GreetingsEntities/GreetingsEntities.csproj | 2 +- .../SalutationEntities/SalutationEntities.csproj | 2 +- .../Paramore.Brighter.DynamoDb.csproj | 2 +- .../Paramore.Brighter.Inbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.MessagingGateway.AWSSQS.csproj | 6 +++--- ...aramore.Brighter.MessagingGateway.AzureServiceBus.csproj | 4 ++-- .../Paramore.Brighter.MessagingGateway.Redis.csproj | 2 +- .../Paramore.Brighter.MsSql.Azure.csproj | 2 +- .../Paramore.Brighter.Outbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.Sqlite.Dapper.csproj | 2 +- .../Paramore.Brighter.Tranformers.AWS.csproj | 4 ++-- .../Paramore.Brighter.Azure.Tests.csproj | 2 +- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/samples/ASBTaskQueue/Greetings/Greetings.csproj b/samples/ASBTaskQueue/Greetings/Greetings.csproj index ed14f1a1b0..e104e4fa11 100644 --- a/samples/ASBTaskQueue/Greetings/Greetings.csproj +++ b/samples/ASBTaskQueue/Greetings/Greetings.csproj @@ -13,7 +13,7 @@ - + diff --git a/samples/RMQTaskQueue/Greetings/Greetings.csproj b/samples/RMQTaskQueue/Greetings/Greetings.csproj index 9cead58590..968801ef89 100644 --- a/samples/RMQTaskQueue/Greetings/Greetings.csproj +++ b/samples/RMQTaskQueue/Greetings/Greetings.csproj @@ -10,7 +10,7 @@ - + diff --git a/samples/WebAPI_Dapper/GreetingsPorts/GreetingsPorts.csproj b/samples/WebAPI_Dapper/GreetingsPorts/GreetingsPorts.csproj index 833ed911c8..da22657d98 100644 --- a/samples/WebAPI_Dapper/GreetingsPorts/GreetingsPorts.csproj +++ b/samples/WebAPI_Dapper/GreetingsPorts/GreetingsPorts.csproj @@ -12,7 +12,7 @@ - + diff --git a/samples/WebAPI_Dapper/SalutationPorts/SalutationPorts.csproj b/samples/WebAPI_Dapper/SalutationPorts/SalutationPorts.csproj index 8b5a84a736..83ecb6e1ec 100644 --- a/samples/WebAPI_Dapper/SalutationPorts/SalutationPorts.csproj +++ b/samples/WebAPI_Dapper/SalutationPorts/SalutationPorts.csproj @@ -11,7 +11,7 @@ - + diff --git a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj index 2fd0743526..ce77516fd5 100644 --- a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj +++ b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj index 3665e88f83..0ce1349488 100644 --- a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj +++ b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj index 2c316889c7..89f1b3916b 100644 --- a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj +++ b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj @@ -5,7 +5,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj index 205e7c2785..5163a334a4 100644 --- a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj index 42bc82357a..7b0dc2ecc0 100644 --- a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj +++ b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj @@ -9,11 +9,11 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/Paramore.Brighter.MessagingGateway.AzureServiceBus.csproj b/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/Paramore.Brighter.MessagingGateway.AzureServiceBus.csproj index 4ff38b88c9..339196b538 100644 --- a/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/Paramore.Brighter.MessagingGateway.AzureServiceBus.csproj +++ b/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/Paramore.Brighter.MessagingGateway.AzureServiceBus.csproj @@ -7,10 +7,10 @@ 8.0 - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.Redis/Paramore.Brighter.MessagingGateway.Redis.csproj b/src/Paramore.Brighter.MessagingGateway.Redis/Paramore.Brighter.MessagingGateway.Redis.csproj index fce16097fc..98b73eb281 100644 --- a/src/Paramore.Brighter.MessagingGateway.Redis/Paramore.Brighter.MessagingGateway.Redis.csproj +++ b/src/Paramore.Brighter.MessagingGateway.Redis/Paramore.Brighter.MessagingGateway.Redis.csproj @@ -10,7 +10,7 @@ - + all diff --git a/src/Paramore.Brighter.MsSql.Azure/Paramore.Brighter.MsSql.Azure.csproj b/src/Paramore.Brighter.MsSql.Azure/Paramore.Brighter.MsSql.Azure.csproj index 3c6c128e97..c5305ca8bc 100644 --- a/src/Paramore.Brighter.MsSql.Azure/Paramore.Brighter.MsSql.Azure.csproj +++ b/src/Paramore.Brighter.MsSql.Azure/Paramore.Brighter.MsSql.Azure.csproj @@ -12,7 +12,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj index c2af3f5d0a..dd90a5ee6c 100644 --- a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Sqlite.Dapper/Paramore.Brighter.Sqlite.Dapper.csproj b/src/Paramore.Brighter.Sqlite.Dapper/Paramore.Brighter.Sqlite.Dapper.csproj index b8a92e2fc1..3aa22d646e 100644 --- a/src/Paramore.Brighter.Sqlite.Dapper/Paramore.Brighter.Sqlite.Dapper.csproj +++ b/src/Paramore.Brighter.Sqlite.Dapper/Paramore.Brighter.Sqlite.Dapper.csproj @@ -10,7 +10,7 @@ - + all diff --git a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj index ed0b140851..b86cdcaef1 100644 --- a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj +++ b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj @@ -18,8 +18,8 @@ - - + + diff --git a/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj b/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj index 9af4c2555e..5620bf0605 100644 --- a/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj +++ b/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj @@ -9,7 +9,7 @@ - + From da92ffc938c168e9998e2d53fd2773cea45acdcb Mon Sep 17 00:00:00 2001 From: Ian Cooper Date: Sun, 22 Oct 2023 15:55:11 +0100 Subject: [PATCH 32/41] Patch Tuesday --- samples/ASBTaskQueue/Greetings/Greetings.csproj | 2 +- .../GreetingsSender.Web/GreetingsSender.Web.csproj | 2 +- samples/WebAPI_Dapper/GreetingsPorts/GreetingsPorts.csproj | 2 +- .../SalutationAnalytics/SalutationAnalytics.csproj | 2 +- .../WebAPI_Dapper/SalutationPorts/SalutationPorts.csproj | 2 +- .../GreetingsEntities/GreetingsEntities.csproj | 2 +- .../SalutationEntities/SalutationEntities.csproj | 2 +- .../Salutations_SqliteMigrations.csproj | 2 +- .../Paramore.Brighter.DynamoDb.csproj | 2 +- .../Paramore.Brighter.Inbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.Inbox.Sqlite.csproj | 2 +- .../Paramore.Brighter.MessagingGateway.AWSSQS.csproj | 6 +++--- ...aramore.Brighter.MessagingGateway.AzureServiceBus.csproj | 4 ++-- .../Paramore.Brighter.MessagingGateway.RMQ.csproj | 2 +- .../Paramore.Brighter.MsSql.Azure.csproj | 2 +- .../Paramore.Brighter.MsSql.EntityFrameworkCore.csproj | 6 +++--- .../Paramore.Brighter.MySql.EntityFrameworkCore.csproj | 4 ++-- .../Paramore.Brighter.Outbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.Outbox.Sqlite.csproj | 2 +- .../Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj | 4 ++-- ....Brighter.ServiceActivator.Extensions.Diagnostics.csproj | 2 +- .../Paramore.Brighter.Sqlite.Dapper.csproj | 2 +- .../Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj | 6 +++--- .../Paramore.Brighter.Sqlite.csproj | 2 +- .../Paramore.Brighter.Tranformers.AWS.csproj | 4 ++-- .../Paramore.Brighter.AWS.Tests.csproj | 4 ++-- .../Paramore.Brighter.Azure.Tests.csproj | 2 +- .../Paramore.Brighter.AzureServiceBus.Tests.csproj | 4 ++-- .../Paramore.Brighter.Core.Tests.csproj | 4 ++-- .../Paramore.Brighter.DynamoDB.Tests.csproj | 4 ++-- .../Paramore.Brighter.EventStore.Tests.csproj | 4 ++-- .../Paramore.Brighter.Extensions.Tests.csproj | 4 ++-- .../Paramore.Brighter.InMemory.Tests.csproj | 4 ++-- .../Paramore.Brighter.Kafka.Tests.csproj | 4 ++-- .../Paramore.Brighter.MSSQL.Tests.csproj | 4 ++-- .../Paramore.Brighter.MySQL.Tests.csproj | 4 ++-- .../Paramore.Brighter.PostgresSQL.Tests.csproj | 4 ++-- .../Paramore.Brighter.RESTMS.Tests.csproj | 4 ++-- .../Paramore.Brighter.RMQ.Tests.csproj | 4 ++-- .../Paramore.Brighter.Redis.Tests.csproj | 4 ++-- .../Paramore.Brighter.Sqlite.Tests.csproj | 4 ++-- 41 files changed, 66 insertions(+), 66 deletions(-) diff --git a/samples/ASBTaskQueue/Greetings/Greetings.csproj b/samples/ASBTaskQueue/Greetings/Greetings.csproj index e104e4fa11..b457362ee8 100644 --- a/samples/ASBTaskQueue/Greetings/Greetings.csproj +++ b/samples/ASBTaskQueue/Greetings/Greetings.csproj @@ -13,7 +13,7 @@ - + diff --git a/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj b/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj index 58f678aedf..4b10d125c6 100644 --- a/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj +++ b/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj @@ -14,7 +14,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/samples/WebAPI_Dapper/GreetingsPorts/GreetingsPorts.csproj b/samples/WebAPI_Dapper/GreetingsPorts/GreetingsPorts.csproj index da22657d98..b013116f90 100644 --- a/samples/WebAPI_Dapper/GreetingsPorts/GreetingsPorts.csproj +++ b/samples/WebAPI_Dapper/GreetingsPorts/GreetingsPorts.csproj @@ -12,7 +12,7 @@ - + diff --git a/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj b/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj index 0028de6aba..5d837f1970 100644 --- a/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj +++ b/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj @@ -23,7 +23,7 @@ - + diff --git a/samples/WebAPI_Dapper/SalutationPorts/SalutationPorts.csproj b/samples/WebAPI_Dapper/SalutationPorts/SalutationPorts.csproj index 83ecb6e1ec..c513055246 100644 --- a/samples/WebAPI_Dapper/SalutationPorts/SalutationPorts.csproj +++ b/samples/WebAPI_Dapper/SalutationPorts/SalutationPorts.csproj @@ -11,7 +11,7 @@ - + diff --git a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj index ce77516fd5..6b9685f0ce 100644 --- a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj +++ b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj index 0ce1349488..c213a12c8d 100644 --- a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj +++ b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj b/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj index 1a26fb8ee2..7d0e4950f0 100644 --- a/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj +++ b/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj index 89f1b3916b..5cbbe010b1 100644 --- a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj +++ b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj @@ -5,7 +5,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj index 5163a334a4..92f8790ff7 100644 --- a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj b/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj index fbd31c051e..a6364542bb 100644 --- a/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj +++ b/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj @@ -7,7 +7,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj index 7b0dc2ecc0..c4ac4916fc 100644 --- a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj +++ b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj @@ -9,11 +9,11 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/Paramore.Brighter.MessagingGateway.AzureServiceBus.csproj b/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/Paramore.Brighter.MessagingGateway.AzureServiceBus.csproj index 339196b538..f3b17fc355 100644 --- a/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/Paramore.Brighter.MessagingGateway.AzureServiceBus.csproj +++ b/src/Paramore.Brighter.MessagingGateway.AzureServiceBus/Paramore.Brighter.MessagingGateway.AzureServiceBus.csproj @@ -7,8 +7,8 @@ 8.0 - - + + diff --git a/src/Paramore.Brighter.MessagingGateway.RMQ/Paramore.Brighter.MessagingGateway.RMQ.csproj b/src/Paramore.Brighter.MessagingGateway.RMQ/Paramore.Brighter.MessagingGateway.RMQ.csproj index 1621ad6a56..a203ed8b9d 100644 --- a/src/Paramore.Brighter.MessagingGateway.RMQ/Paramore.Brighter.MessagingGateway.RMQ.csproj +++ b/src/Paramore.Brighter.MessagingGateway.RMQ/Paramore.Brighter.MessagingGateway.RMQ.csproj @@ -9,7 +9,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MsSql.Azure/Paramore.Brighter.MsSql.Azure.csproj b/src/Paramore.Brighter.MsSql.Azure/Paramore.Brighter.MsSql.Azure.csproj index c5305ca8bc..cca8ecae7f 100644 --- a/src/Paramore.Brighter.MsSql.Azure/Paramore.Brighter.MsSql.Azure.csproj +++ b/src/Paramore.Brighter.MsSql.Azure/Paramore.Brighter.MsSql.Azure.csproj @@ -12,7 +12,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj b/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj index aa2ef6da60..4bdff0486e 100644 --- a/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj @@ -33,9 +33,9 @@ - - - + + + diff --git a/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj b/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj index f55ad731b2..883bb65e1b 100644 --- a/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj @@ -25,9 +25,9 @@ - + - + diff --git a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj index dd90a5ee6c..e0e40a34c7 100644 --- a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj b/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj index a5579d2ac0..bfc40be5f2 100644 --- a/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj +++ b/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj @@ -11,7 +11,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj b/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj index 863d12de9c..a48fcab916 100644 --- a/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj @@ -28,8 +28,8 @@ - - + + diff --git a/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj b/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj index 39d765ea8a..5ff981ee3c 100644 --- a/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj +++ b/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj @@ -8,7 +8,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Sqlite.Dapper/Paramore.Brighter.Sqlite.Dapper.csproj b/src/Paramore.Brighter.Sqlite.Dapper/Paramore.Brighter.Sqlite.Dapper.csproj index 3aa22d646e..e23afa689c 100644 --- a/src/Paramore.Brighter.Sqlite.Dapper/Paramore.Brighter.Sqlite.Dapper.csproj +++ b/src/Paramore.Brighter.Sqlite.Dapper/Paramore.Brighter.Sqlite.Dapper.csproj @@ -10,7 +10,7 @@ - + all diff --git a/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj b/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj index fb87cc7aee..a0b006b579 100644 --- a/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj @@ -27,9 +27,9 @@ - - - + + + diff --git a/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj b/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj index b6b9a66259..5781d5641e 100644 --- a/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj +++ b/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj @@ -7,7 +7,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj index b86cdcaef1..322171d89e 100644 --- a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj +++ b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj @@ -18,8 +18,8 @@ - - + + diff --git a/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj b/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj index ae45dc57c9..f8ca9f8a68 100644 --- a/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj +++ b/tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj @@ -14,8 +14,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj b/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj index 5620bf0605..2e0857d094 100644 --- a/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj +++ b/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj @@ -9,7 +9,7 @@ - + diff --git a/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj b/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj index 4ce9ed019e..ba19e59075 100644 --- a/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj +++ b/tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj @@ -14,8 +14,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj b/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj index 849bdae26e..bdb15b12d1 100644 --- a/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj +++ b/tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj @@ -21,8 +21,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj b/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj index 702fa74c83..aaabee7c4a 100644 --- a/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj +++ b/tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj b/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj index 1002f3d460..c1f90a0728 100644 --- a/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj +++ b/tests/Paramore.Brighter.EventStore.Tests/Paramore.Brighter.EventStore.Tests.csproj @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj b/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj index 743de6c955..5de89b5831 100644 --- a/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj +++ b/tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj @@ -12,8 +12,8 @@ - - + + all runtime; build; native; contentfiles; analyzers diff --git a/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj b/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj index 24f27c94a3..d675a480ea 100644 --- a/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj +++ b/tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj b/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj index a4f2b58001..42aaa68f36 100644 --- a/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj +++ b/tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj b/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj index 278cc35150..65051cce6e 100644 --- a/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj +++ b/tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj @@ -15,8 +15,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj b/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj index 6c391774b6..01f68d1c0a 100644 --- a/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj +++ b/tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj @@ -14,8 +14,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj b/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj index 65a5dc69ea..e1d1b913c7 100644 --- a/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj +++ b/tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj @@ -14,8 +14,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj b/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj index d3b7326383..5d28b8bb84 100644 --- a/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj +++ b/tests/Paramore.Brighter.RESTMS.Tests/Paramore.Brighter.RESTMS.Tests.csproj @@ -12,8 +12,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj b/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj index 53b0fb82e7..c44677a5c6 100644 --- a/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj +++ b/tests/Paramore.Brighter.RMQ.Tests/Paramore.Brighter.RMQ.Tests.csproj @@ -12,8 +12,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj b/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj index 14b5cf4ac9..ef8dea867d 100644 --- a/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj +++ b/tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj @@ -12,8 +12,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj b/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj index c82c2d8ba4..705fb630bf 100644 --- a/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj +++ b/tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj @@ -12,8 +12,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive From c5ff1421b7c7bff07e78cfad12245ab9fd55a205 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 22 Oct 2023 15:58:56 +0100 Subject: [PATCH 33/41] chore(deps): bump dotnet-ef from 7.0.11 to 7.0.12 (#2875) Bumps [dotnet-ef](https://github.com/dotnet/efcore) from 7.0.11 to 7.0.12. - [Release notes](https://github.com/dotnet/efcore/releases) - [Commits](https://github.com/dotnet/efcore/compare/v7.0.11...v7.0.12) --- updated-dependencies: - dependency-name: dotnet-ef dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 96be437d5d..2f789b031a 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "dotnet-ef": { - "version": "7.0.11", + "version": "7.0.12", "commands": [ "dotnet-ef" ] From 3b5a287d9e030dcd6a83e2a5ea2ea6b195d12089 Mon Sep 17 00:00:00 2001 From: Ian Cooper Date: Sun, 22 Oct 2023 16:12:29 +0100 Subject: [PATCH 34/41] Patch Tuesday --- samples/ASBTaskQueue/Greetings/Greetings.csproj | 6 +++--- samples/WebAPI_EFCore/GreetingsWeb/GreetingsWeb.csproj | 2 +- .../Greetings_SqliteMigrations.csproj | 2 +- .../SalutationAnalytics/SalutationAnalytics.csproj | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/ASBTaskQueue/Greetings/Greetings.csproj b/samples/ASBTaskQueue/Greetings/Greetings.csproj index b457362ee8..c01d9de92c 100644 --- a/samples/ASBTaskQueue/Greetings/Greetings.csproj +++ b/samples/ASBTaskQueue/Greetings/Greetings.csproj @@ -14,9 +14,9 @@ - - - + + + diff --git a/samples/WebAPI_EFCore/GreetingsWeb/GreetingsWeb.csproj b/samples/WebAPI_EFCore/GreetingsWeb/GreetingsWeb.csproj index 16e6894cf5..44de9d087e 100644 --- a/samples/WebAPI_EFCore/GreetingsWeb/GreetingsWeb.csproj +++ b/samples/WebAPI_EFCore/GreetingsWeb/GreetingsWeb.csproj @@ -8,7 +8,7 @@ - + diff --git a/samples/WebAPI_EFCore/Greetings_SqliteMigrations/Greetings_SqliteMigrations.csproj b/samples/WebAPI_EFCore/Greetings_SqliteMigrations/Greetings_SqliteMigrations.csproj index 92a352dece..d17c166a7b 100644 --- a/samples/WebAPI_EFCore/Greetings_SqliteMigrations/Greetings_SqliteMigrations.csproj +++ b/samples/WebAPI_EFCore/Greetings_SqliteMigrations/Greetings_SqliteMigrations.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj b/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj index 22ee24b918..b5e340394b 100644 --- a/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj +++ b/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj @@ -34,7 +34,7 @@ - + From a574fec3bbc6a4144f7b934a7c8d3b6192e97dd4 Mon Sep 17 00:00:00 2001 From: dsquadcgi <48057692+dsquadcgi@users.noreply.github.com> Date: Sun, 22 Oct 2023 17:29:06 +0200 Subject: [PATCH 35/41] configure RabbitMq continuation timeout (#2879) Co-authored-by: Benjamin SCHMITT Co-authored-by: Ian Cooper --- .../RmqMessageGateway.cs | 3 ++- .../RmqMessagingGatewayConnection.cs | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Paramore.Brighter.MessagingGateway.RMQ/RmqMessageGateway.cs b/src/Paramore.Brighter.MessagingGateway.RMQ/RmqMessageGateway.cs index 296f577116..d640773fdb 100644 --- a/src/Paramore.Brighter.MessagingGateway.RMQ/RmqMessageGateway.cs +++ b/src/Paramore.Brighter.MessagingGateway.RMQ/RmqMessageGateway.cs @@ -76,7 +76,8 @@ protected RmqMessageGateway(RmqMessagingGatewayConnection connection) _connectionFactory = new ConnectionFactory { Uri = Connection.AmpqUri.Uri, - RequestedHeartbeat = TimeSpan.FromSeconds(connection.Heartbeat) + RequestedHeartbeat = TimeSpan.FromSeconds(connection.Heartbeat), + ContinuationTimeout = TimeSpan.FromSeconds(connection.ContinuationTimeout) }; DelaySupported = Connection.Exchange.SupportDelay; diff --git a/src/Paramore.Brighter.MessagingGateway.RMQ/RmqMessagingGatewayConnection.cs b/src/Paramore.Brighter.MessagingGateway.RMQ/RmqMessagingGatewayConnection.cs index d9108a6a62..732e46b125 100644 --- a/src/Paramore.Brighter.MessagingGateway.RMQ/RmqMessagingGatewayConnection.cs +++ b/src/Paramore.Brighter.MessagingGateway.RMQ/RmqMessagingGatewayConnection.cs @@ -67,6 +67,11 @@ public RmqMessagingGatewayConnection() /// public bool PersistMessages { get; set; } + /// + /// Gets or sets RabbitMq protocol timeouts, in seconds. Defaults to 20s. + /// for more information. + /// + public ushort ContinuationTimeout { get; set; } = 20; } /// From e322c2271efe363f9215c984c41fc7d512bfc47c Mon Sep 17 00:00:00 2001 From: Ian Cooper Date: Mon, 23 Oct 2023 18:54:06 +0100 Subject: [PATCH 36/41] Patch Tuesday --- samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj | 2 +- samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj b/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj index cf5b3c1cb9..534db6397c 100644 --- a/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj +++ b/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj @@ -10,7 +10,7 @@ - + diff --git a/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj b/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj index 3817685a1d..d638ae86a5 100644 --- a/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj +++ b/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj @@ -10,7 +10,7 @@ - + From 8b699553abfe22f3136bfaaa09123f8f4ff0254a Mon Sep 17 00:00:00 2001 From: Ian Cooper Date: Tue, 31 Oct 2023 08:55:01 +0000 Subject: [PATCH 37/41] Patch Tuesday --- samples/ASBTaskQueue/Greetings/Greetings.csproj | 4 ++-- .../GreetingsSender.Web/GreetingsSender.Web.csproj | 2 +- .../SalutationAnalytics/SalutationAnalytics.csproj | 2 +- .../GreetingsEntities/GreetingsEntities.csproj | 2 +- .../SalutationEntities/SalutationEntities.csproj | 2 +- samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj | 2 +- samples/WebAPI_EFCore/GreetingsWeb/GreetingsWeb.csproj | 2 +- .../Greetings_SqliteMigrations.csproj | 2 +- .../SalutationAnalytics/SalutationAnalytics.csproj | 2 +- .../WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj | 2 +- .../Salutations_SqliteMigrations.csproj | 2 +- .../Paramore.Brighter.DynamoDb.csproj | 2 +- .../Paramore.Brighter.Inbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.MessagingGateway.AWSSQS.csproj | 6 +++--- .../Paramore.Brighter.MsSql.EntityFrameworkCore.csproj | 6 +++--- .../Paramore.Brighter.MySql.EntityFrameworkCore.csproj | 4 ++-- .../Paramore.Brighter.Outbox.DynamoDB.csproj | 2 +- .../Paramore.Brighter.Outbox.Sqlite.csproj | 2 +- .../Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj | 4 ++-- ....Brighter.ServiceActivator.Extensions.Diagnostics.csproj | 2 +- .../Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj | 6 +++--- .../Paramore.Brighter.Sqlite.csproj | 2 +- .../Paramore.Brighter.Tranformers.AWS.csproj | 4 ++-- .../Paramore.Brighter.Azure.Tests.csproj | 2 +- 24 files changed, 34 insertions(+), 34 deletions(-) diff --git a/samples/ASBTaskQueue/Greetings/Greetings.csproj b/samples/ASBTaskQueue/Greetings/Greetings.csproj index c01d9de92c..a0657a44a4 100644 --- a/samples/ASBTaskQueue/Greetings/Greetings.csproj +++ b/samples/ASBTaskQueue/Greetings/Greetings.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj b/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj index 4b10d125c6..6814e759bc 100644 --- a/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj +++ b/samples/ASBTaskQueue/GreetingsSender.Web/GreetingsSender.Web.csproj @@ -14,7 +14,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj b/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj index 5d837f1970..ee5dff6bb8 100644 --- a/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj +++ b/samples/WebAPI_Dapper/SalutationAnalytics/SalutationAnalytics.csproj @@ -23,7 +23,7 @@ - + diff --git a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj index 6b9685f0ce..8a9988ee26 100644 --- a/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj +++ b/samples/WebAPI_Dynamo/GreetingsEntities/GreetingsEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj index c213a12c8d..3e0ea19c37 100644 --- a/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj +++ b/samples/WebAPI_Dynamo/SalutationEntities/SalutationEntities.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj b/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj index 534db6397c..6ad024cb6a 100644 --- a/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj +++ b/samples/WebAPI_EFCore/GreetingsPorts/GreetingsPorts.csproj @@ -10,7 +10,7 @@ - + diff --git a/samples/WebAPI_EFCore/GreetingsWeb/GreetingsWeb.csproj b/samples/WebAPI_EFCore/GreetingsWeb/GreetingsWeb.csproj index 44de9d087e..68d27f0623 100644 --- a/samples/WebAPI_EFCore/GreetingsWeb/GreetingsWeb.csproj +++ b/samples/WebAPI_EFCore/GreetingsWeb/GreetingsWeb.csproj @@ -8,7 +8,7 @@ - + diff --git a/samples/WebAPI_EFCore/Greetings_SqliteMigrations/Greetings_SqliteMigrations.csproj b/samples/WebAPI_EFCore/Greetings_SqliteMigrations/Greetings_SqliteMigrations.csproj index d17c166a7b..e347ce3528 100644 --- a/samples/WebAPI_EFCore/Greetings_SqliteMigrations/Greetings_SqliteMigrations.csproj +++ b/samples/WebAPI_EFCore/Greetings_SqliteMigrations/Greetings_SqliteMigrations.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj b/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj index b5e340394b..8a911e922d 100644 --- a/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj +++ b/samples/WebAPI_EFCore/SalutationAnalytics/SalutationAnalytics.csproj @@ -34,7 +34,7 @@ - + diff --git a/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj b/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj index d638ae86a5..8b83a99c91 100644 --- a/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj +++ b/samples/WebAPI_EFCore/SalutationPorts/SalutationPorts.csproj @@ -10,7 +10,7 @@ - + diff --git a/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj b/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj index 7d0e4950f0..23e2d9de53 100644 --- a/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj +++ b/samples/WebAPI_EFCore/Salutations_SqliteMigrations/Salutations_SqliteMigrations.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj index 5cbbe010b1..207ca882f1 100644 --- a/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj +++ b/src/Paramore.Brighter.DynamoDb/Paramore.Brighter.DynamoDb.csproj @@ -5,7 +5,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj index 92f8790ff7..52fe066206 100644 --- a/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Inbox.DynamoDB/Paramore.Brighter.Inbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj index c4ac4916fc..c153b10e63 100644 --- a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj +++ b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj @@ -9,11 +9,11 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj b/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj index 4bdff0486e..71e5261460 100644 --- a/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.MsSql.EntityFrameworkCore/Paramore.Brighter.MsSql.EntityFrameworkCore.csproj @@ -33,9 +33,9 @@ - - - + + + diff --git a/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj b/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj index 883bb65e1b..ebd27b90ea 100644 --- a/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.MySql.EntityFrameworkCore/Paramore.Brighter.MySql.EntityFrameworkCore.csproj @@ -25,9 +25,9 @@ - + - + diff --git a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj index e0e40a34c7..49b163ebd4 100644 --- a/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj +++ b/src/Paramore.Brighter.Outbox.DynamoDB/Paramore.Brighter.Outbox.DynamoDB.csproj @@ -3,7 +3,7 @@ netstandard2.0;net6.0;net7.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj b/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj index bfc40be5f2..f994f0b047 100644 --- a/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj +++ b/src/Paramore.Brighter.Outbox.Sqlite/Paramore.Brighter.Outbox.Sqlite.csproj @@ -11,7 +11,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj b/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj index a48fcab916..6bf84b7043 100644 --- a/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.PostgreSql.EntityFrameworkCore/Paramore.Brighter.PostgreSql.EntityFrameworkCore.csproj @@ -28,8 +28,8 @@ - - + + diff --git a/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj b/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj index 5ff981ee3c..512e184298 100644 --- a/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj +++ b/src/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics/Paramore.Brighter.ServiceActivator.Extensions.Diagnostics.csproj @@ -8,7 +8,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj b/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj index a0b006b579..78cadaab64 100644 --- a/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj +++ b/src/Paramore.Brighter.Sqlite.EntityFrameworkCore/Paramore.Brighter.Sqlite.EntityFrameworkCore.csproj @@ -27,9 +27,9 @@ - - - + + + diff --git a/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj b/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj index 5781d5641e..7927e10d0d 100644 --- a/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj +++ b/src/Paramore.Brighter.Sqlite/Paramore.Brighter.Sqlite.csproj @@ -7,7 +7,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj index 322171d89e..091483b672 100644 --- a/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj +++ b/src/Paramore.Brighter.Tranformers.AWS/Paramore.Brighter.Tranformers.AWS.csproj @@ -18,8 +18,8 @@ - - + + diff --git a/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj b/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj index 2e0857d094..a6343defc5 100644 --- a/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj +++ b/tests/Paramore.Brighter.Azure.Tests/Paramore.Brighter.Azure.Tests.csproj @@ -14,7 +14,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 49766e203a851b9a8d25ce75d900682d0761f069 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 17:15:56 +0000 Subject: [PATCH 38/41] chore(deps): bump dotnet-ef from 7.0.12 to 7.0.13 (#2889) Bumps [dotnet-ef](https://github.com/dotnet/efcore) from 7.0.12 to 7.0.13. - [Release notes](https://github.com/dotnet/efcore/releases) - [Commits](https://github.com/dotnet/efcore/compare/v7.0.12...v7.0.13) --- updated-dependencies: - dependency-name: dotnet-ef dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 2f789b031a..dbe78984a2 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "dotnet-ef": { - "version": "7.0.12", + "version": "7.0.13", "commands": [ "dotnet-ef" ] From a64e4585481cdba51f50ed17871dadfc652883d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 17:17:19 +0000 Subject: [PATCH 39/41] chore(deps): bump Microsoft.Data.Sqlite from 7.0.12 to 7.0.13 (#2885) Bumps [Microsoft.Data.Sqlite](https://github.com/dotnet/efcore) from 7.0.12 to 7.0.13. - [Release notes](https://github.com/dotnet/efcore/releases) - [Commits](https://github.com/dotnet/efcore/compare/v7.0.12...v7.0.13) --- updated-dependencies: - dependency-name: Microsoft.Data.Sqlite dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Paramore.Brighter.Inbox.Sqlite.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj b/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj index a6364542bb..c8604b8a02 100644 --- a/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj +++ b/src/Paramore.Brighter.Inbox.Sqlite/Paramore.Brighter.Inbox.Sqlite.csproj @@ -1,4 +1,4 @@ - + This is an implementation of the inbox used for decoupled invocation of commands by Paramore.Brighter, using Sqlite Ian Cooper @@ -7,7 +7,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From e5e727ffb97aef53603dccc2f2504270cfbacd93 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 17:18:36 +0000 Subject: [PATCH 40/41] chore(deps): bump AWSSDK.SQS from 3.7.200.60 to 3.7.200.64 (#2888) Bumps [AWSSDK.SQS](https://github.com/aws/aws-sdk-net) from 3.7.200.60 to 3.7.200.64. - [Changelog](https://github.com/aws/aws-sdk-net/blob/main/SDK.CHANGELOG.MD) - [Commits](https://github.com/aws/aws-sdk-net/commits) --- updated-dependencies: - dependency-name: AWSSDK.SQS dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ian Cooper --- .../Paramore.Brighter.MessagingGateway.AWSSQS.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj index c153b10e63..ab35333c91 100644 --- a/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj +++ b/src/Paramore.Brighter.MessagingGateway.AWSSQS/Paramore.Brighter.MessagingGateway.AWSSQS.csproj @@ -13,7 +13,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 81bdddf2fa74780c195e1eba412853bd7d816299 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 17:19:24 +0000 Subject: [PATCH 41/41] chore(deps): bump Microsoft.Data.SqlClient from 5.1.1 to 5.1.2 (#2890) Bumps [Microsoft.Data.SqlClient](https://github.com/dotnet/sqlclient) from 5.1.1 to 5.1.2. - [Release notes](https://github.com/dotnet/sqlclient/releases) - [Changelog](https://github.com/dotnet/SqlClient/blob/main/CHANGELOG.md) - [Commits](https://github.com/dotnet/sqlclient/compare/v5.1.1...v5.1.2) --- updated-dependencies: - dependency-name: Microsoft.Data.SqlClient dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ian Cooper --- .../Paramore.Brighter.MsSql.Dapper.csproj | 2 +- src/Paramore.Brighter.MsSql/Paramore.Brighter.MsSql.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Paramore.Brighter.MsSql.Dapper/Paramore.Brighter.MsSql.Dapper.csproj b/src/Paramore.Brighter.MsSql.Dapper/Paramore.Brighter.MsSql.Dapper.csproj index 1547d1d040..5c69501f29 100644 --- a/src/Paramore.Brighter.MsSql.Dapper/Paramore.Brighter.MsSql.Dapper.csproj +++ b/src/Paramore.Brighter.MsSql.Dapper/Paramore.Brighter.MsSql.Dapper.csproj @@ -5,7 +5,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Paramore.Brighter.MsSql/Paramore.Brighter.MsSql.csproj b/src/Paramore.Brighter.MsSql/Paramore.Brighter.MsSql.csproj index 5507cfc904..bdb590abee 100644 --- a/src/Paramore.Brighter.MsSql/Paramore.Brighter.MsSql.csproj +++ b/src/Paramore.Brighter.MsSql/Paramore.Brighter.MsSql.csproj @@ -8,7 +8,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive