From cab3ac1fe99dc64cc7db82aa24a394840dc6444d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96hlund?= Date: Thu, 8 Feb 2024 11:24:49 +0100 Subject: [PATCH 1/4] Prepare RTM --- .github/workflows/ci.yml | 1 - .github/workflows/release.yml | 1 - ...erviceBus.Transport.AzureServiceBus.AcceptanceTests.csproj | 2 +- src/Tests/NServiceBus.Transport.AzureServiceBus.Tests.csproj | 4 ++-- src/Transport/NServiceBus.Transport.AzureServiceBus.csproj | 4 ++-- ...ServiceBus.Transport.AzureServiceBus.TransportTests.csproj | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5758efe..f56aa040 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,6 @@ jobs: uses: actions/setup-dotnet@v4.0.0 with: dotnet-version: 8.0.x - dotnet-quality: 'preview' - name: Build run: dotnet build src --configuration Release - name: Upload packages diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4b845ba1..60a0b61c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,6 @@ jobs: uses: actions/setup-dotnet@v4.0.0 with: dotnet-version: 8.0.x - dotnet-quality: 'preview' - name: Build run: dotnet build src --configuration Release - name: Sign NuGet packages diff --git a/src/AcceptanceTests/NServiceBus.Transport.AzureServiceBus.AcceptanceTests.csproj b/src/AcceptanceTests/NServiceBus.Transport.AzureServiceBus.AcceptanceTests.csproj index 3f1c4d6b..ba5cced4 100644 --- a/src/AcceptanceTests/NServiceBus.Transport.AzureServiceBus.AcceptanceTests.csproj +++ b/src/AcceptanceTests/NServiceBus.Transport.AzureServiceBus.AcceptanceTests.csproj @@ -13,7 +13,7 @@ - + diff --git a/src/Tests/NServiceBus.Transport.AzureServiceBus.Tests.csproj b/src/Tests/NServiceBus.Transport.AzureServiceBus.Tests.csproj index 1a9a7142..1e1cc917 100644 --- a/src/Tests/NServiceBus.Transport.AzureServiceBus.Tests.csproj +++ b/src/Tests/NServiceBus.Transport.AzureServiceBus.Tests.csproj @@ -13,8 +13,8 @@ - - + + diff --git a/src/Transport/NServiceBus.Transport.AzureServiceBus.csproj b/src/Transport/NServiceBus.Transport.AzureServiceBus.csproj index 642f62fe..67433d3f 100644 --- a/src/Transport/NServiceBus.Transport.AzureServiceBus.csproj +++ b/src/Transport/NServiceBus.Transport.AzureServiceBus.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/src/TransportTests/NServiceBus.Transport.AzureServiceBus.TransportTests.csproj b/src/TransportTests/NServiceBus.Transport.AzureServiceBus.TransportTests.csproj index bd44d6f5..2372cb1f 100644 --- a/src/TransportTests/NServiceBus.Transport.AzureServiceBus.TransportTests.csproj +++ b/src/TransportTests/NServiceBus.Transport.AzureServiceBus.TransportTests.csproj @@ -12,7 +12,7 @@ - + From 913baedb637285df91826865339c487d375bd59e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96hlund?= Date: Fri, 9 Feb 2024 10:17:26 +0100 Subject: [PATCH 2/4] Tweaks --- ...iceBus.Transport.AzureServiceBus.AcceptanceTests.csproj | 4 ++-- .../NServiceBus.Transport.AzureServiceBus.Tests.csproj | 7 ++----- src/Transport/NServiceBus.Transport.AzureServiceBus.csproj | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/AcceptanceTests/NServiceBus.Transport.AzureServiceBus.AcceptanceTests.csproj b/src/AcceptanceTests/NServiceBus.Transport.AzureServiceBus.AcceptanceTests.csproj index ba5cced4..5301726b 100644 --- a/src/AcceptanceTests/NServiceBus.Transport.AzureServiceBus.AcceptanceTests.csproj +++ b/src/AcceptanceTests/NServiceBus.Transport.AzureServiceBus.AcceptanceTests.csproj @@ -3,7 +3,7 @@ net8.0 true - $(SolutionDir)NServiceBusTests.snk + ..\NServiceBusTests.snk @@ -18,7 +18,7 @@ - + diff --git a/src/Tests/NServiceBus.Transport.AzureServiceBus.Tests.csproj b/src/Tests/NServiceBus.Transport.AzureServiceBus.Tests.csproj index 1e1cc917..ea88939b 100644 --- a/src/Tests/NServiceBus.Transport.AzureServiceBus.Tests.csproj +++ b/src/Tests/NServiceBus.Transport.AzureServiceBus.Tests.csproj @@ -3,7 +3,7 @@ net8.0 true - $(SolutionDir)NServiceBusTests.snk + ..\NServiceBusTests.snk @@ -15,14 +15,11 @@ + - - - - \ No newline at end of file diff --git a/src/Transport/NServiceBus.Transport.AzureServiceBus.csproj b/src/Transport/NServiceBus.Transport.AzureServiceBus.csproj index 67433d3f..d826a6ad 100644 --- a/src/Transport/NServiceBus.Transport.AzureServiceBus.csproj +++ b/src/Transport/NServiceBus.Transport.AzureServiceBus.csproj @@ -3,7 +3,7 @@ net8.0 true - $(SolutionDir)NServiceBus.snk + ..\NServiceBus.snk Azure Service Bus transport for NServiceBus From 257c90bf0db2669f8f00fdf97fa3bc0069390fac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96hlund?= Date: Fri, 9 Feb 2024 10:22:00 +0100 Subject: [PATCH 3/4] Cleanup --- ...rviceBus.Transport.AzureServiceBus.AcceptanceTests.csproj | 5 +---- .../Testing/TestableCustomizeNativeMessageExtensionsTests.cs | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/AcceptanceTests/NServiceBus.Transport.AzureServiceBus.AcceptanceTests.csproj b/src/AcceptanceTests/NServiceBus.Transport.AzureServiceBus.AcceptanceTests.csproj index 5301726b..43f7501c 100644 --- a/src/AcceptanceTests/NServiceBus.Transport.AzureServiceBus.AcceptanceTests.csproj +++ b/src/AcceptanceTests/NServiceBus.Transport.AzureServiceBus.AcceptanceTests.csproj @@ -14,12 +14,9 @@ + - - - - \ No newline at end of file diff --git a/src/Tests/Testing/TestableCustomizeNativeMessageExtensionsTests.cs b/src/Tests/Testing/TestableCustomizeNativeMessageExtensionsTests.cs index 1ca2be02..e22771e2 100644 --- a/src/Tests/Testing/TestableCustomizeNativeMessageExtensionsTests.cs +++ b/src/Tests/Testing/TestableCustomizeNativeMessageExtensionsTests.cs @@ -65,6 +65,4 @@ class MyMessage { } } - - } \ No newline at end of file From 2b18832ffb9e4e99790d2dd97ac662066e2bf66f Mon Sep 17 00:00:00 2001 From: Brandon Ording Date: Fri, 9 Feb 2024 16:18:24 -0500 Subject: [PATCH 4/4] Tweaks --- ...ort.AzureServiceBus.AcceptanceTests.csproj | 2 +- ...ansport.AzureServiceBus.CommandLine.csproj | 6 +-- src/CommandLineTests/CommandLineTests.cs | 38 +++++++++++++------ ...t.AzureServiceBus.CommandLine.Tests.csproj | 1 - ...Bus.Transport.AzureServiceBus.Tests.csproj | 4 +- ...erviceBus.Transport.AzureServiceBus.csproj | 4 +- ...estableCustomizeNativeMessageExtensions.cs | 2 +- 7 files changed, 35 insertions(+), 22 deletions(-) diff --git a/src/AcceptanceTests/NServiceBus.Transport.AzureServiceBus.AcceptanceTests.csproj b/src/AcceptanceTests/NServiceBus.Transport.AzureServiceBus.AcceptanceTests.csproj index 43f7501c..44fd401b 100644 --- a/src/AcceptanceTests/NServiceBus.Transport.AzureServiceBus.AcceptanceTests.csproj +++ b/src/AcceptanceTests/NServiceBus.Transport.AzureServiceBus.AcceptanceTests.csproj @@ -11,10 +11,10 @@ + - diff --git a/src/CommandLine/NServiceBus.Transport.AzureServiceBus.CommandLine.csproj b/src/CommandLine/NServiceBus.Transport.AzureServiceBus.CommandLine.csproj index ac5789a1..0445a9d6 100644 --- a/src/CommandLine/NServiceBus.Transport.AzureServiceBus.CommandLine.csproj +++ b/src/CommandLine/NServiceBus.Transport.AzureServiceBus.CommandLine.csproj @@ -1,4 +1,4 @@ - + net8.0 @@ -10,9 +10,9 @@ - - + + diff --git a/src/CommandLineTests/CommandLineTests.cs b/src/CommandLineTests/CommandLineTests.cs index f3960862..92f5d881 100644 --- a/src/CommandLineTests/CommandLineTests.cs +++ b/src/CommandLineTests/CommandLineTests.cs @@ -1,8 +1,8 @@ namespace NServiceBus.Transport.AzureServiceBus.CommandLine.Tests { using System; + using System.Collections.Generic; using System.Diagnostics; - using System.Linq; using System.Threading.Tasks; using Azure.Messaging.ServiceBus; using Azure.Messaging.ServiceBus.Administration; @@ -291,46 +291,60 @@ async Task VerifySubscription(string topicName, string subscriptionName, string Assert.AreEqual(queueName, actual.UserMetadata); // rules - var rules = await client.GetRulesAsync(topicName, subscriptionName).ToListAsync(); + var rules = new List(); + + await foreach (var rule in client.GetRulesAsync(topicName, subscriptionName)) + { + rules.Add(rule); + } + Assert.IsTrue(rules.Count == 4); - var defaultRule = rules.ElementAt(0); + var defaultRule = rules[0]; Assert.AreEqual("$default", defaultRule.Name); Assert.AreEqual(new FalseRuleFilter().SqlExpression, ((FalseRuleFilter)defaultRule.Filter).SqlExpression); - var customRuleNameRule = rules.ElementAt(1); + var customRuleNameRule = rules[1]; Assert.AreEqual("CustomRuleName", customRuleNameRule.Name); Assert.AreEqual(new SqlRuleFilter("[NServiceBus.EnclosedMessageTypes] LIKE '%MyNamespace1.MyMessage3%'").SqlExpression, ((SqlRuleFilter)customRuleNameRule.Filter).SqlExpression); - var myMessage1Rule = rules.ElementAt(2); + var myMessage1Rule = rules[2]; Assert.AreEqual("MyMessage1", myMessage1Rule.Name); Assert.AreEqual(new SqlRuleFilter("[NServiceBus.EnclosedMessageTypes] LIKE '%MyMessage1%'").SqlExpression, ((SqlRuleFilter)myMessage1Rule.Filter).SqlExpression); - var myMessage2WithNamespace = rules.ElementAt(3); + var myMessage2WithNamespace = rules[3]; Assert.AreEqual("MyNamespace1.MyMessage2", myMessage2WithNamespace.Name); Assert.AreEqual(new SqlRuleFilter("[NServiceBus.EnclosedMessageTypes] LIKE '%MyNamespace1.MyMessage2%'").SqlExpression, ((SqlRuleFilter)myMessage2WithNamespace.Filter).SqlExpression); } async Task VerifySubscriptionContainsOnlyDefaultRule(string topicName, string subscriptionName) { - // rules - var rules = await client.GetRulesAsync(topicName, subscriptionName).ToListAsync(); + var rules = new List(); + + await foreach (var rule in client.GetRulesAsync(topicName, subscriptionName)) + { + rules.Add(rule); + } Assert.IsTrue(rules.Count == 1); - var defaultRule = rules.ElementAt(0); + var defaultRule = rules[0]; Assert.AreEqual("$default", defaultRule.Name); Assert.AreEqual(new FalseRuleFilter().SqlExpression, ((FalseRuleFilter)defaultRule.Filter).SqlExpression); } async Task VerifySubscriptionContainsOnlyDefaultMatchAllRule(string topicName, string subscriptionName) { - // rules - var rules = await client.GetRulesAsync(topicName, subscriptionName).ToListAsync(); + var rules = new List(); + + await foreach (var rule in client.GetRulesAsync(topicName, subscriptionName)) + { + rules.Add(rule); + } Assert.IsTrue(rules.Count == 1); - var defaultRule = rules.ElementAt(0); + var defaultRule = rules[0]; Assert.AreEqual("$default", defaultRule.Name); Assert.AreEqual(new TrueRuleFilter().SqlExpression, ((TrueRuleFilter)defaultRule.Filter).SqlExpression); } diff --git a/src/CommandLineTests/NServiceBus.Transport.AzureServiceBus.CommandLine.Tests.csproj b/src/CommandLineTests/NServiceBus.Transport.AzureServiceBus.CommandLine.Tests.csproj index e18efa6a..c54ea515 100644 --- a/src/CommandLineTests/NServiceBus.Transport.AzureServiceBus.CommandLine.Tests.csproj +++ b/src/CommandLineTests/NServiceBus.Transport.AzureServiceBus.CommandLine.Tests.csproj @@ -9,7 +9,6 @@ - diff --git a/src/Tests/NServiceBus.Transport.AzureServiceBus.Tests.csproj b/src/Tests/NServiceBus.Transport.AzureServiceBus.Tests.csproj index ea88939b..b617a500 100644 --- a/src/Tests/NServiceBus.Transport.AzureServiceBus.Tests.csproj +++ b/src/Tests/NServiceBus.Transport.AzureServiceBus.Tests.csproj @@ -1,4 +1,4 @@ - + net8.0 @@ -11,11 +11,11 @@ + - diff --git a/src/Transport/NServiceBus.Transport.AzureServiceBus.csproj b/src/Transport/NServiceBus.Transport.AzureServiceBus.csproj index d826a6ad..8ab9ed2e 100644 --- a/src/Transport/NServiceBus.Transport.AzureServiceBus.csproj +++ b/src/Transport/NServiceBus.Transport.AzureServiceBus.csproj @@ -1,4 +1,4 @@ - + net8.0 @@ -10,12 +10,12 @@ - + diff --git a/src/Transport/Testing/TestableCustomizeNativeMessageExtensions.cs b/src/Transport/Testing/TestableCustomizeNativeMessageExtensions.cs index 9c5a1078..7d451bcb 100644 --- a/src/Transport/Testing/TestableCustomizeNativeMessageExtensions.cs +++ b/src/Transport/Testing/TestableCustomizeNativeMessageExtensions.cs @@ -10,7 +10,7 @@ public static partial class TestableCustomizeNativeMessageExtensions { /// - /// Gets the customization of the outgoing native message sent using , or . + /// Gets the customization of the outgoing native message sent using , or . /// /// Option being extended. /// The customization action or null.