Skip to content

Commit

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

* Use system json

* Approve

* Tweaks

---------

Co-authored-by: Brandon Ording <bording@gmail.com>
  • Loading branch information
andreasohlund and bording authored Feb 19, 2024
1 parent dfb626a commit da38d08
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 21 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,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 All @@ -41,4 +40,3 @@ jobs:
retention-days: 7
- name: Run tests
uses: Particular/run-tests-action@v1.7.0

5 changes: 2 additions & 3 deletions .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 All @@ -37,5 +36,5 @@ jobs:
- name: Deploy
uses: Particular/push-octopus-package-action@v1.2.1
with:
octopus-deploy-api-key: ${{ secrets.OCTOPUS_DEPLOY_API_KEY }}
octopus-deploy-api-key: ${{ secrets.OCTOPUS_DEPLOY_API_KEY }}

Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<ItemGroup>
<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.1" />
<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" />
Expand Down
2 changes: 2 additions & 0 deletions src/NServiceBus.Callbacks.AcceptanceTests/DefaultServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public async Task<EndpointConfiguration> GetConfiguration(RunDescriptor runDescr

var storageDir = Path.Combine(NServiceBusAcceptanceTest.StorageRootDir, NUnit.Framework.TestContext.CurrentContext.Test.ID);

configuration.UseSerialization<SystemJsonSerializer>();

configuration.UseTransport(new LearningTransport
{
StorageDirectory = storageDir
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger" Version="2.3.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NServiceBus.AcceptanceTesting" Version="9.0.0-alpha.1" />
<PackageReference Include="NServiceBus.AcceptanceTesting" Version="9.0.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(SolutionDir)NServiceBus.snk</AssemblyOriginatorKeyFile>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<AssemblyOriginatorKeyFile>..\NServiceBus.snk</AssemblyOriginatorKeyFile>
<Description>NServiceBus Callbacks Testing</Description>
</PropertyGroup>

Expand All @@ -13,7 +12,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NServiceBus.Testing" Version="9.0.0-alpha.1" />
<PackageReference Include="NServiceBus.Testing" Version="[9.0.0, 10.0.0)" />
<PackageReference Include="Particular.Packaging" Version="4.0.0" PrivateAssets="All" />
</ItemGroup>

Expand Down
12 changes: 12 additions & 0 deletions src/NServiceBus.Callbacks.Testing/TestableCallbackAwareSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,25 @@
using NServiceBus;
using NServiceBus.Testing;

/// <summary>
/// A callbacks-aware testable <see cref="IMessageSession"/> implementation.
/// </summary>
public class TestableCallbackAwareSession : TestableMessageSession
{
List<Tuple<Func<object, SendOptions, bool>, object>> matchers = [];

/// <summary>
/// Registers a response for the matched request.
/// </summary>
public void When<TRequest, TResult>(Func<TRequest, bool> matcher, TResult response)
where TRequest : class
{
When((TRequest m, SendOptions _) => matcher(m), response);
}

/// <summary>
/// Registers a response for the matched request.
/// </summary>
public void When<TRequest, TResult>(Func<TRequest, SendOptions, bool> matcher, TResult response)
where TRequest : class
{
Expand All @@ -27,6 +36,9 @@ public void When<TRequest, TResult>(Func<TRequest, SendOptions, bool> matcher, T
}, response));
}

/// <summary>
/// Sends the provided message.
/// </summary>
public override async Task Send(object message, SendOptions options, CancellationToken cancellationToken = default)
{
await base.Send(message, options, cancellationToken).ConfigureAwait(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[assembly: System.CLSCompliant(false)]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"NServiceBus.Callbacks.Testing, PublicKey=0024000004800000940000000602000000240000525341310004000001000100dde965e6172e019ac82c2639ffe494dd2e7dd16347c34762a05732b492e110f2e4e2e1b5ef2d85c848ccfb671ee20a47c8d1376276708dc30a90ff1121b647ba3b7259a6bc383b2034938ef0e275b58b920375ac605076178123693c6c4f1331661a62eba28c249386855637780e3ff5f23a6d854700eaa6803ef48907513b92")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"NServiceBus.Callbacks.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100dde965e6172e019ac82c2639ffe494dd2e7dd16347c34762a05732b492e110f2e4e2e1b5ef2d85c848ccfb671ee20a47c8d1376276708dc30a90ff1121b647ba3b7259a6bc383b2034938ef0e275b58b920375ac605076178123693c6c4f1331661a62eba28c249386855637780e3ff5f23a6d854700eaa6803ef48907513b92")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"NServiceBus.Callbacks.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001007f16e21368ff041183fab592d9e8ed37e7be355e93323147a1d29983d6e591b04282e4da0c9e18bd901e112c0033925eb7d7872c2f1706655891c5c9d57297994f707d16ee9a8f40d978f064ee1ffc73c0db3f4712691b23bf596f75130f4ec978cf78757ec034625a5f27e6bb50c618931ea49f6f628fd74271c32959efb1c5")]
[assembly: System.Runtime.InteropServices.ComVisible(false)]
namespace NServiceBus
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

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

<ItemGroup>
Expand All @@ -14,7 +14,7 @@
<ItemGroup>
<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.1" />
<PackageReference Include="NServiceBus" 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" />
Expand Down
4 changes: 0 additions & 4 deletions src/NServiceBus.Callbacks/InternalsVisibleTo.cs

This file was deleted.

9 changes: 7 additions & 2 deletions src/NServiceBus.Callbacks/NServiceBus.Callbacks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(SolutionDir)NServiceBus.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>..\NServiceBus.snk</AssemblyOriginatorKeyFile>
<Description>NServiceBus Callbacks</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NServiceBus" Version="9.0.0-alpha.1" />
<PackageReference Include="NServiceBus" Version="[9.0.0, 10.0.0)" />
<PackageReference Include="Particular.Packaging" Version="4.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="NServiceBus.Callbacks.Testing" Key="$(NServiceBusKey)" />
<InternalsVisibleTo Include="NServiceBus.Callbacks.Tests" Key="$(NServiceBusTestsKey)" />
</ItemGroup>

</Project>

0 comments on commit da38d08

Please sign in to comment.