Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
bfd4148
Use alpha
danielmarbach May 8, 2026
b501ebb
Remove no longer needed extension methods
danielmarbach May 8, 2026
9e939bd
Acceptance testing alpha
danielmarbach May 8, 2026
2ae719e
RegisterComponent
danielmarbach May 8, 2026
3d2d69a
Replace `errorContext.Message` with direct `errorContext` usage.
danielmarbach May 10, 2026
39e4bbc
LogManager.Use suppressions
danielmarbach May 10, 2026
88e6509
RegisterScenarioContext method added
danielmarbach May 10, 2026
3d1793f
Get the scenario context from settings for now and update registratio…
danielmarbach May 10, 2026
bdea8e9
Adjust to local build and update service resolve
danielmarbach May 10, 2026
2842307
Add ScenarioContext to host builder for dependency resolution
danielmarbach May 11, 2026
6f4f329
Refactor message handler constructors to use parameterized constructo…
danielmarbach May 11, 2026
e37c518
Refactor InternalCustomChecks to use collection initialization syntax
danielmarbach May 11, 2026
55de642
Remove assembly exclusion logic from endpoint configuration
danielmarbach May 11, 2026
c37b6d7
Register handlers
danielmarbach May 11, 2026
965c92a
Disable assembly scanner in monitoring too
danielmarbach May 11, 2026
d361cd2
Customization extensions also need to disable assembly scanner
danielmarbach May 11, 2026
4b17296
Get rid off NServiceBus.Extensions.Hosting dependency
danielmarbach May 11, 2026
afea705
Get rid of the custom context appender since Core acceptance tests do…
danielmarbach May 11, 2026
69774a3
Update NServiceBus packages to version 10.2.0-alpha.10
danielmarbach May 11, 2026
db27c43
Alpha.12 and lift up some others too
danielmarbach May 19, 2026
b4617e0
use the right host
danielmarbach May 19, 2026
5399659
I don't think hosting APIs is necessary
danielmarbach May 19, 2026
64a401e
Make the import fail command leaner by not requiring the entire API a…
danielmarbach May 19, 2026
2c447e7
Remove custom context appender
danielmarbach May 19, 2026
63489cd
Move extensions logging into the transports only
danielmarbach May 19, 2026
a10a65d
Adjust test and acceptance tests with handler and saga attributes, co…
danielmarbach May 20, 2026
8659618
Alpha 13
danielmarbach May 20, 2026
85d483d
Use the scenario context appender provider
danielmarbach May 20, 2026
66772c8
Sorting
danielmarbach May 20, 2026
676b583
Remove unneeded AddLogging
danielmarbach May 20, 2026
050a3bd
Remove unneeded context logger extensions
danielmarbach May 20, 2026
a2265a7
Move provider into the correct place
danielmarbach May 20, 2026
4c6a61b
Update NServiceBus package versions to stable 10.2.0 and adjust testi…
danielmarbach May 26, 2026
8faed65
Register audit instance custom checks (ravendb ones are still not reg…
danielmarbach May 26, 2026
90bd8c1
Cosmetics on audit custom checks
danielmarbach May 26, 2026
841e547
Register dead letter queue checks
danielmarbach May 26, 2026
ec4203b
Fix indexOf with ordinal
danielmarbach May 26, 2026
5ebcb6c
Reformat
danielmarbach May 26, 2026
a52de65
Wire up persistence custom checks via service collection backdoor for…
danielmarbach May 26, 2026
b4b98e3
UseV2DeterministicGuid to true since we are not regular NServiceBus e…
danielmarbach May 26, 2026
8f74913
Minor cleanup on the tests
danielmarbach May 26, 2026
b4c7ca5
Update core packages
danielmarbach May 28, 2026
a55db11
Remove custom checks from audit instances
danielmarbach May 29, 2026
4b2ea90
Add comments to clarify the purpose of the DeadLetterQueueCheck
danielmarbach May 29, 2026
f6b0861
Refactor DeadLetterQueueCheck to use dependency injection for logger
danielmarbach May 29, 2026
d09b2c4
Enhance assembly loading logic to prioritize default context for shar…
danielmarbach May 29, 2026
deacc9a
Update NServiceBus and NServiceBus.AcceptanceTesting to version 10.2.3
danielmarbach May 29, 2026
7a86f35
Refactor custom check registration to use TryAddEnumerable for DeadLe…
danielmarbach May 29, 2026
c2d775f
Clarify comments in TransportTestFixture regarding logger factory usa…
danielmarbach Jun 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 6 additions & 7 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,24 @@
<PackageVersion Include="Microsoft-WindowsAPICodePack-Shell" Version="1.1.5" />
<PackageVersion Include="Mindscape.Raygun4Net.NetCore" Version="11.2.5" />
<PackageVersion Include="NLog.Extensions.Logging" Version="6.1.3" />
<PackageVersion Include="NServiceBus" Version="10.1.4" />
<PackageVersion Include="NServiceBus.AcceptanceTesting" Version="10.1.4" />
<PackageVersion Include="NServiceBus" Version="10.2.3" />
<PackageVersion Include="NServiceBus.AcceptanceTesting" Version="10.2.3" />
<PackageVersion Include="NServiceBus.AmazonSQS" Version="9.0.1" />
<PackageVersion Include="NServiceBus.CustomChecks" Version="6.0.1" />
<PackageVersion Include="NServiceBus.Extensions.Hosting" Version="4.0.1" />
<PackageVersion Include="NServiceBus.Extensions.Logging" Version="4.0.1" />
<PackageVersion Include="NServiceBus.Extensions.Logging" Version="4.1.0" />
<PackageVersion Include="NServiceBus.Heartbeat" Version="6.0.1" />
<PackageVersion Include="NServiceBus.Metrics" Version="6.0.1" />
<PackageVersion Include="NServiceBus.Metrics.ServiceControl" Version="6.0.1" />
<PackageVersion Include="NServiceBus.Persistence.NonDurable" Version="3.0.1" />
<PackageVersion Include="NServiceBus.RabbitMQ" Version="11.2.1" />
<PackageVersion Include="NServiceBus.SagaAudit" Version="6.0.1" />
<PackageVersion Include="NServiceBus.Testing" Version="10.0.2" />
<PackageVersion Include="NServiceBus.Testing" Version="10.1.0" />
<PackageVersion Include="NServiceBus.Transport.AzureServiceBus" Version="6.3.0" />
<PackageVersion Include="NServiceBus.Transport.AzureStorageQueues" Version="14.0.1" />
<PackageVersion Include="NServiceBus.Transport.Msmq.Sources" Version="4.0.1" />
<PackageVersion Include="NServiceBus.Transport.PostgreSql" Version="9.0.1" />
<PackageVersion Include="NServiceBus.Transport.SqlServer" Version="9.0.1" />
<PackageVersion Include="NServiceBus.Transport.IBMMQ" Version="1.0.1"/>
<PackageVersion Include="NServiceBus.Transport.IBMMQ" Version="1.0.1" />
<PackageVersion Include="NuGet.Versioning" Version="7.6.0" />
<PackageVersion Include="NUnit" Version="4.6.1" />
<PackageVersion Include="NUnit.Analyzers" Version="4.13.0" />
Expand Down Expand Up @@ -94,4 +93,4 @@
<GlobalPackageReference Include="Microsoft.Build.CopyOnWrite" Version="1.0.334" />
<GlobalPackageReference Include="Particular.Packaging" Version="4.5.0" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
namespace Particular.LicensingComponent.Contracts;

public record AuditServiceMetadata(Dictionary<string, int> Versions, Dictionary<string, int> Transports)
{
}
public record AuditServiceMetadata(Dictionary<string, int> Versions, Dictionary<string, int> Transports);
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
namespace Particular.LicensingComponent.Contracts;

public record BrokerMetadata(string? ScopeType, Dictionary<string, string> Data)
{
}
public record BrokerMetadata(string? ScopeType, Dictionary<string, string> Data);
24 changes: 12 additions & 12 deletions src/Particular.LicensingComponent.UnitTests/AuditQuery_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ public async Task Should_return_known_endpoints_if_any()
//Assert
Assert.That(endpoints, Is.Not.Null, "Endpoints should be found");
Assert.That(endpoints.Count, Is.EqualTo(2), "Invalid number of on known endpoints");
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(endpoints.Any(a => a.Name == "Endpoint1"), Is.True, "Should have found Endpoint1");
Assert.That(endpoints.Any(a => a.Name == "Endpoint2"), Is.True, "Should have found Endpoint2");
});
}
}

[Test]
Expand All @@ -58,20 +58,20 @@ public async Task Should_return_audit_remotes()
//Assert
Assert.That(remotes, Is.Not.Null, "Remotes should be found");
Assert.That(remotes, Has.Count.EqualTo(1), "Invalid number of remotes");
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(remotes[0].ApiUri, Is.EqualTo("http://localhost:44444/api/"), "Invalid ApiUri on remote");
Assert.That(remotes[0].VersionString, Is.EqualTo("5.1.0"), "Invalid VersionString on remote");
Assert.That(remotes[0].Retention, Is.EqualTo(new TimeSpan(7, 0, 0, 0)), "Invalid Retention on remote");
Assert.That(remotes[0].Queues, Is.Not.Null, "Queues should be reported on remote");
});
}

Assert.That(remotes[0].Queues, Has.Count.EqualTo(2), "Invalid number of queues reported on remote");
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(remotes[0].Queues, Does.Contain("audit"), "Should have foind audit queue");
Assert.That(remotes[0].Queues, Does.Contain("audit.log"), "Should have found audit.log queue");
});
}
}

[Test]
Expand All @@ -85,11 +85,11 @@ public async Task Should_return_successful_audit_connection_if_instances_exist_a

//Assert
Assert.That(connectionSettingsResult, Is.Not.Null, "connectionSettingsResult should be returned");
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(connectionSettingsResult.ConnectionSuccessful, Is.True, "Connection status should be successful");
Assert.That(connectionSettingsResult.ConnectionErrorMessages.Count, Is.EqualTo(0), "Unexpected ConnectionErrorMessages");
});
}

Approver.Verify(connectionSettingsResult.Diagnostics);
}
Expand All @@ -107,11 +107,11 @@ public async Task Should_return_diagnostics_and_no_errors_when_no_remotes_define

//Assert
Assert.That(connectionSettingsResult, Is.Not.Null, "connectionSettingsResult should be returned");
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(connectionSettingsResult.ConnectionSuccessful, Is.True, "Connection status should be successful");
Assert.That(connectionSettingsResult.ConnectionErrorMessages.Count, Is.EqualTo(0), "Unexpected ConnectionErrorMessages");
});
}

Approver.Verify(connectionSettingsResult.Diagnostics);
}
Expand All @@ -132,11 +132,11 @@ public async Task Should_always_return_diagnostics_and_relevant_errors_when_inva

//Assert
Assert.That(connectionSettingsResult, Is.Not.Null, "connectionSettingsResult should be returned");
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(connectionSettingsResult.ConnectionSuccessful, Is.False, "Connection status should not be successful");
Assert.That(connectionSettingsResult.ConnectionErrorMessages.Count, Is.Not.EqualTo(0), "Expected ConnectionErrorMessages");
});
}

Approver.Verify(connectionSettingsResult.Diagnostics, scenario: $"status_{remoteStatus}.version_{remoteVersion?.Replace(".", "") ?? "null"}.retention_{retensionPeriod[0]}");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,19 +188,19 @@ await Task.Run(async () =>

// Assert
Assert.That(foundEndpoint, Is.Not.Null, $"Expected to find endpoint {endpointName}");
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(foundEndpoint.Id.Name, Is.EqualTo(endpointName), $"Expected name to be {endpointName}");
Assert.That(foundEndpointThroughput, Is.Not.Null, "Expected endpoint throughput");
});
}
Assert.That(foundEndpointThroughput.ContainsKey(endpointName), Is.True, $"Expected throughput for {endpointName}");

Assert.That(throughputData.Length, Is.EqualTo(1), $"Expected 1 throughput data for {endpointName}");
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(throughputData[0].ContainsKey(throughputDate), Is.True, $"Expected throughput for {throughputDate}");
Assert.That(throughputData[0][throughputDate], Is.EqualTo(throughputCount), $"Expected throughput for {throughputDate} to be {throughputCount}");
});
}
}

class AuditQuery_NoAuditRemotes : IAuditQuery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ await Task.Run(async () =>
} while (!token.IsCancellationRequested);
});

Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(mockedBrokerThroughputQueryThatThrowsExceptions.GetQueueNamesCalls, Is.GreaterThan(1));
Assert.That(mockedBrokerThroughputQueryThatThrowsExceptions.GetGetThroughputPerDay, Is.GreaterThan(1));
});
}
}

[Test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ public virtual Task Setup()
protected ThroughputTestsConfiguration configuration = new();

[AttributeUsage(AttributeTargets.Method)]
public class UseNonBrokerTransportAttribute : Attribute
{
}
public class UseNonBrokerTransportAttribute : Attribute;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,27 @@ public async Task Should_record_new_endpoint_and_throughput()

// Assert
Assert.That(foundEndpoint, Is.Not.Null, "Expected to find Endpoint1");
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(foundEndpoint.Id.Name, Is.EqualTo("Endpoint1"), "Expected name to be Endpoint1");
Assert.That(foundEndpoint.EndpointIndicators, Is.Not.Null, "Expected to find endpoint indicators");
});
}
Assert.That(foundEndpoint.EndpointIndicators, Does.Contain(EndpointIndicator.KnownEndpoint.ToString()),
"Expected KnownEndpoint indicator");

Assert.That(foundEndpointThroughput, Is.Not.Null, "Expected endpoint throughput");
Assert.That(foundEndpointThroughput.ContainsKey("Endpoint1"), Is.True, "Expected throughput for Endpoint1");

Assert.That(throughputData.Length, Is.EqualTo(1), "Expected 1 throughput data for Endpoint1");
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(throughputData[0].ThroughputSource, Is.EqualTo(ThroughputSource.Monitoring),
"Expected ThroughputSource to be Monitoring for Endpoint1");
Assert.That(throughputData[0].Keys.Contains(DateOnly.FromDateTime(message.EndDateTime.Date)), Is.True,
$"Expected throughput for {message.StartDateTime.Date} for Endpoint1");
Assert.That(throughputData[0][DateOnly.FromDateTime(message.EndDateTime.Date)], Is.EqualTo(15),
$"Expected throughput for {message.StartDateTime.Date} to be 15 for Endpoint1");
});
}
}

[Test]
Expand Down Expand Up @@ -113,12 +113,12 @@ public async Task Should_return_successful_monitoring_connection_and_diagnostics

// Assert
Assert.That(connectionSettingsResult, Is.Not.Null, "connectionSettingsResult should be returned");
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(connectionSettingsResult.ConnectionSuccessful, Is.True, "Connection status should be successful");
Assert.That(connectionSettingsResult.ConnectionErrorMessages.Count, Is.EqualTo(0),
"Unexpected ConnectionErrorMessages");
});
}

Assert.That(connectionSettingsResult.Diagnostics, Is.Not.Null, "Expected diagnostic");
Assert.That(
Expand All @@ -143,13 +143,13 @@ public async Task Should_return_error_monitoring_connection_and_diagnostics_if_n

// Assert
Assert.That(connectionSettingsResult, Is.Not.Null, "connectionSettingsResult should be returned");
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(connectionSettingsResult.ConnectionSuccessful, Is.False,
"Connection status should be unsuccessful");
Assert.That(connectionSettingsResult.ConnectionErrorMessages.Count, Is.EqualTo(0),
"Unexpected ConnectionErrorMessages");
});
}

Assert.That(connectionSettingsResult.Diagnostics, Is.Not.Null, "Expected diagnostic");
Assert.That(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ await DataStore.CreateBuilder()
var reportGenerationState = await ThroughputCollector.GetReportGenerationState(default);

// Assert
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(reportGenerationState.ReportCanBeGenerated, Is.True);
Assert.That(reportGenerationState.Reason, Is.EqualTo(""));
});
}
}


Expand All @@ -48,11 +48,11 @@ await DataStore.CreateBuilder()
var reportGenerationState = await ThroughputCollector.GetReportGenerationState(default);

// Assert
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(reportGenerationState.ReportCanBeGenerated, Is.True);
Assert.That(reportGenerationState.Reason, Is.EqualTo(""));
});
}
}

[Test]
Expand All @@ -69,11 +69,11 @@ await DataStore.CreateBuilder()
var reportGenerationState = await ThroughputCollector.GetReportGenerationState(default);

// Assert
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(reportGenerationState.ReportCanBeGenerated, Is.False);
Assert.That(reportGenerationState.Reason, Does.Contain("one day"), "Report generation failure reason does not contain 'one day'");
});
}
Assert.That(reportGenerationState.Reason, Does.Contain("broker"), "Report generation failure reason does not contain 'broker'");
}

Expand All @@ -90,11 +90,11 @@ await DataStore.CreateBuilder().AddEndpoint()
var reportGenerationState = await ThroughputCollector.GetReportGenerationState(default);

// Assert
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(reportGenerationState.ReportCanBeGenerated, Is.False);
Assert.That(reportGenerationState.Reason, Does.Contain("one day"), "Report generation failure reason does not contain 'one day'");
});
}
Assert.That(reportGenerationState.Reason, Does.Contain("broker"), "Report generation failure reason does not contain 'broker'");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ await DataStore.CreateBuilder()
var reportEndDate = new DateTimeOffset(maxDate.ToDateTime(TimeOnly.MinValue, DateTimeKind.Utc));

Assert.That(report, Is.Not.Null);
Assert.Multiple(() =>
using (Assert.EnterMultipleScope())
{
Assert.That(report.ReportData.Queues.Count, Is.EqualTo(3));
Assert.That(report.ReportData.StartTime, Is.EqualTo(minDateInReport), $"Incorrect StartTime for report");
Assert.That(report.ReportData.EndTime, Is.EqualTo(reportEndDate), $"Incorrect StartTime for report");
Assert.That(report.ReportData.ReportDuration, Is.EqualTo(reportEndDate - minDateInReport), $"Incorrect ReportDuration for report");
});
}
}
}
Loading
Loading