Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d3420d0
Use alpha
danielmarbach May 8, 2026
c69359a
Remove no longer needed extension methods
danielmarbach May 8, 2026
a15b58f
Acceptance testing alpha
danielmarbach May 8, 2026
c10bb61
RegisterComponent
danielmarbach May 8, 2026
2e7dee0
Replace `errorContext.Message` with direct `errorContext` usage.
danielmarbach May 10, 2026
435a7b2
LogManager.Use suppressions
danielmarbach May 10, 2026
7dba171
RegisterScenarioContext method added
danielmarbach May 10, 2026
c894564
Get the scenario context from settings for now and update registratio…
danielmarbach May 10, 2026
3f040de
Adjust to local build and update service resolve
danielmarbach May 10, 2026
ce9664a
Add ScenarioContext to host builder for dependency resolution
danielmarbach May 11, 2026
ed777e2
Refactor message handler constructors to use parameterized constructo…
danielmarbach May 11, 2026
d218894
Refactor InternalCustomChecks to use collection initialization syntax
danielmarbach May 11, 2026
2f63435
Remove assembly exclusion logic from endpoint configuration
danielmarbach May 11, 2026
e186bf6
Register handlers
danielmarbach May 11, 2026
7cb20d8
Disable assembly scanner in monitoring too
danielmarbach May 11, 2026
ca28231
Customization extensions also need to disable assembly scanner
danielmarbach May 11, 2026
dc5f50d
Get rid off NServiceBus.Extensions.Hosting dependency
danielmarbach May 11, 2026
147b30f
Get rid of the custom context appender since Core acceptance tests do…
danielmarbach May 11, 2026
00c999e
Update NServiceBus packages to version 10.2.0-alpha.10
danielmarbach May 11, 2026
5ac7379
Alpha.12 and lift up some others too
danielmarbach May 19, 2026
d4b50fd
use the right host
danielmarbach May 19, 2026
66fa988
I don't think hosting APIs is necessary
danielmarbach May 19, 2026
8647400
Make the import fail command leaner by not requiring the entire API a…
danielmarbach May 19, 2026
11e9622
Remove custom context appender
danielmarbach May 19, 2026
bfc87a4
Move extensions logging into the transports only
danielmarbach May 19, 2026
34749f3
Adjust test and acceptance tests with handler and saga attributes, co…
danielmarbach May 20, 2026
85b2f3e
Alpha 13
danielmarbach May 20, 2026
2979433
Use the scenario context appender provider
danielmarbach May 20, 2026
72a5f5b
Sorting
danielmarbach May 20, 2026
0b323a4
Remove unneeded AddLogging
danielmarbach May 20, 2026
2be5097
Remove unneeded context logger extensions
danielmarbach May 20, 2026
047dd2b
Move provider into the correct place
danielmarbach May 20, 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
  •  
  •  
  •  
9 changes: 4 additions & 5 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup Label="Versions for direct package references">
<PackageVersion Include="Autofac" Version="9.1.0" />
<PackageVersion Include="AWSSDK.CloudWatch" Version="4.0.10.4" />
<PackageVersion Include="AWSSDK.CloudWatch" Version="4.0.10.1" />
<PackageVersion Include="Azure.Identity" Version="1.21.0" />
<PackageVersion Include="Azure.Monitor.Query.Metrics" Version="1.0.0" />
<PackageVersion Include="Azure.ResourceManager.ServiceBus" Version="1.1.0" />
Expand Down Expand Up @@ -34,11 +34,10 @@
<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-alpha.13" />
<PackageVersion Include="NServiceBus.AcceptanceTesting" Version="10.2.0-alpha.13" />
<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" />
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