Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
b23b261
Use alpha
danielmarbach May 8, 2026
c68d049
Remove no longer needed extension methods
danielmarbach May 8, 2026
931a975
Acceptance testing alpha
danielmarbach May 8, 2026
5ee879e
RegisterComponent
danielmarbach May 8, 2026
255dea8
Replace `errorContext.Message` with direct `errorContext` usage.
danielmarbach May 10, 2026
3d2ecf3
LogManager.Use suppressions
danielmarbach May 10, 2026
873ff76
RegisterScenarioContext method added
danielmarbach May 10, 2026
f928799
Get the scenario context from settings for now and update registratio…
danielmarbach May 10, 2026
b26d068
Adjust to local build and update service resolve
danielmarbach May 10, 2026
7a7be49
Add ScenarioContext to host builder for dependency resolution
danielmarbach May 11, 2026
b1da340
Refactor message handler constructors to use parameterized constructo…
danielmarbach May 11, 2026
7b9116e
Refactor InternalCustomChecks to use collection initialization syntax
danielmarbach May 11, 2026
b8d3862
Remove assembly exclusion logic from endpoint configuration
danielmarbach May 11, 2026
90ee60d
Register handlers
danielmarbach May 11, 2026
4a143a0
Disable assembly scanner in monitoring too
danielmarbach May 11, 2026
0f4c174
Customization extensions also need to disable assembly scanner
danielmarbach May 11, 2026
09de5eb
Get rid off NServiceBus.Extensions.Hosting dependency
danielmarbach May 11, 2026
2023ed3
Get rid of the custom context appender since Core acceptance tests do…
danielmarbach May 11, 2026
c6b602d
Update NServiceBus packages to version 10.2.0-alpha.10
danielmarbach May 11, 2026
4cd8f36
Alpha.12 and lift up some others too
danielmarbach May 19, 2026
00901d6
use the right host
danielmarbach May 19, 2026
1edfd2e
I don't think hosting APIs is necessary
danielmarbach May 19, 2026
7174f86
Make the import fail command leaner by not requiring the entire API a…
danielmarbach May 19, 2026
26c9517
Remove custom context appender
danielmarbach May 19, 2026
3b3ea4a
Move extensions logging into the transports only
danielmarbach May 19, 2026
b62dafe
Adjust test and acceptance tests with handler and saga attributes, co…
danielmarbach May 20, 2026
48e6bb6
Alpha 13
danielmarbach May 20, 2026
213d3c7
Use the scenario context appender provider
danielmarbach May 20, 2026
2553f13
Sorting
danielmarbach May 20, 2026
31295d1
Remove unneeded AddLogging
danielmarbach May 20, 2026
d3bbb09
Remove unneeded context logger extensions
danielmarbach May 20, 2026
5da1946
Move provider into the correct place
danielmarbach May 20, 2026
ba3f0d5
Update NServiceBus package versions to stable 10.2.0 and adjust testi…
danielmarbach May 26, 2026
8e82d9a
Register audit instance custom checks (ravendb ones are still not reg…
danielmarbach May 26, 2026
b68ca35
Cosmetics on audit custom checks
danielmarbach May 26, 2026
38c550f
Register dead letter queue checks
danielmarbach May 26, 2026
c58a58f
Fix indexOf with ordinal
danielmarbach May 26, 2026
458d466
Reformat
danielmarbach May 26, 2026
f3d2731
Wire up persistence custom checks via service collection backdoor for…
danielmarbach May 26, 2026
1887fee
UseV2DeterministicGuid to true since we are not regular NServiceBus e…
danielmarbach May 26, 2026
ac6327f
Minor cleanup on the tests
danielmarbach May 26, 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
  •  
  •  
  •  
11 changes: 5 additions & 6 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.0" />
<PackageVersion Include="NServiceBus.AcceptanceTesting" Version="10.2.0" />
<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.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