Skip to content

Commit

Permalink
Prepare RTM (#930)
Browse files Browse the repository at this point in the history
* Prepare RTM

* Tweaks

* Cleanup

* Tweaks

---------

Co-authored-by: Brandon Ording <bording@gmail.com>
  • Loading branch information
andreasohlund and bording authored Feb 9, 2024
1 parent 09dcb84 commit 091013b
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 41 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,20 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(SolutionDir)NServiceBusTests.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>..\NServiceBusTests.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Transport\NServiceBus.Transport.AzureServiceBus.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.17.2" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.3.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NServiceBus.AcceptanceTests.Sources" Version="9.0.0-alpha.9" />
<PackageReference Include="NServiceBus.AcceptanceTests.Sources" Version="9.0.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>

<ItemGroup Label="Force the latest version of the transitive dependencies">
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.17.2" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
Expand All @@ -10,9 +10,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.0" />
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.17.2" />
<PackageReference Include="Azure.Identity" Version="1.10.4" />
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.17.2" />
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.0" />
<PackageReference Include="Particular.Packaging" Version="4.0.0" PrivateAssets="All" />
</ItemGroup>

Expand Down
38 changes: 26 additions & 12 deletions src/CommandLineTests/CommandLineTests.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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<RuleProperties>();

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<RuleProperties>();

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<RuleProperties>();

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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.3.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
Expand Down
13 changes: 5 additions & 8 deletions src/Tests/NServiceBus.Transport.AzureServiceBus.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(SolutionDir)NServiceBusTests.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>..\NServiceBusTests.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Transport\NServiceBus.Transport.AzureServiceBus.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.17.2" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.3.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NServiceBus" Version="9.0.0-alpha.9" />
<PackageReference Include="NServiceBus.Testing" Version="9.0.0-alpha.1" />
<PackageReference Include="NServiceBus" Version="9.0.0" />
<PackageReference Include="NServiceBus.Testing" Version="9.0.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Particular.Approvals" Version="1.0.0" />
<PackageReference Include="PublicApiGenerator" Version="11.1.0" />
</ItemGroup>

<ItemGroup Label="Force the latest version of the transitive dependencies">
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.17.2" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,4 @@ class MyMessage
{
}
}


}
10 changes: 5 additions & 5 deletions src/Transport/NServiceBus.Transport.AzureServiceBus.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(SolutionDir)NServiceBus.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>..\NServiceBus.snk</AssemblyOriginatorKeyFile>
<Description>Azure Service Bus transport for NServiceBus</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Messaging.ServiceBus" Version="[7.13.1, 8.0.0)" />
<PackageReference Include="NServiceBus" Version="9.0.0-alpha.9" />
<PackageReference Include="Particular.Packaging" Version="4.0.0" PrivateAssets="All" />
<PackageReference Include="Azure.Messaging.ServiceBus" Version="[7.17.2, 8.0.0)" />
<PackageReference Include="NServiceBus" Version="[9.0.0, 10.0.0)" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Fody" Version="6.8.0" PrivateAssets="All" />
<PackageReference Include="Obsolete.Fody" Version="5.3.0" PrivateAssets="All" />
<PackageReference Include="Particular.Packaging" Version="4.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public static partial class TestableCustomizeNativeMessageExtensions
{
/// <summary>
/// Gets the customization of the outgoing native message sent using <see cref="NServiceBus.SendOptions"/>, <see cref="NServiceBus.PublishOptions"/> or <see cref="NServiceBus.ReplyOptions"/>.
/// Gets the customization of the outgoing native message sent using <see cref="SendOptions"/>, <see cref="PublishOptions"/> or <see cref="ReplyOptions"/>.
/// </summary>
/// <param name="options">Option being extended.</param>
/// <returns>The customization action or null.</returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.17.2" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.3.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NServiceBus.TransportTests.Sources" Version="9.0.0-alpha.9" />
<PackageReference Include="NServiceBus.TransportTests.Sources" Version="9.0.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>
Expand Down

0 comments on commit 091013b

Please sign in to comment.