From 0a989526b8ac0190c57d5add0f307c4a3ff66edd Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Thu, 4 Dec 2025 19:31:53 +0100 Subject: [PATCH 01/27] Formatting --- .../EndpointIndicator.cs | 1 + .../EnvironmentDataType.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Particular.LicensingComponent.Contracts/EndpointIndicator.cs b/src/Particular.LicensingComponent.Contracts/EndpointIndicator.cs index da304d2435..3ca1c18b0e 100644 --- a/src/Particular.LicensingComponent.Contracts/EndpointIndicator.cs +++ b/src/Particular.LicensingComponent.Contracts/EndpointIndicator.cs @@ -1,4 +1,5 @@ namespace Particular.LicensingComponent.Contracts; + using System.Text.Json.Serialization; [JsonConverter(typeof(JsonStringEnumConverter))] diff --git a/src/Particular.LicensingComponent.Contracts/EnvironmentDataType.cs b/src/Particular.LicensingComponent.Contracts/EnvironmentDataType.cs index 4d387ed098..8ef7518e5f 100644 --- a/src/Particular.LicensingComponent.Contracts/EnvironmentDataType.cs +++ b/src/Particular.LicensingComponent.Contracts/EnvironmentDataType.cs @@ -1,4 +1,5 @@ namespace Particular.LicensingComponent.Contracts; + using System.Text.Json.Serialization; [JsonConverter(typeof(JsonStringEnumConverter))] @@ -10,4 +11,4 @@ public enum EnvironmentDataType AuditInstances, ServiceControlVersion, ServicePulseVersion -} +} \ No newline at end of file From b943aacf54280d7d1ad3f99ae36394cf8e790c91 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Thu, 4 Dec 2025 19:32:09 +0100 Subject: [PATCH 02/27] Certificate loading --- src/ServiceControl.RavenDB/RavenClientCertificate.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ServiceControl.RavenDB/RavenClientCertificate.cs b/src/ServiceControl.RavenDB/RavenClientCertificate.cs index 0c6bc2dbb8..9792418aa7 100644 --- a/src/ServiceControl.RavenDB/RavenClientCertificate.cs +++ b/src/ServiceControl.RavenDB/RavenClientCertificate.cs @@ -15,7 +15,7 @@ public static class RavenClientCertificate try { var bytes = Convert.FromBase64String(certInfo.ClientCertificateBase64); - return new X509Certificate2(bytes, certInfo.ClientCertificatePassword); + return X509CertificateLoader.LoadPkcs12(bytes, certInfo.ClientCertificatePassword); } catch (Exception x) when (x is FormatException or CryptographicException) { @@ -29,7 +29,7 @@ public static class RavenClientCertificate { throw new Exception("Could not read the RavenDB client certificate from the supplied path because no file was found."); } - return new X509Certificate2(certInfo.ClientCertificatePath, certInfo.ClientCertificatePassword); + return X509CertificateLoader.LoadPkcs12FromFile(certInfo.ClientCertificatePath, certInfo.ClientCertificatePassword); } var applicationDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location) ?? string.Empty; @@ -37,7 +37,7 @@ public static class RavenClientCertificate if (File.Exists(certificatePath)) { - return new X509Certificate2(certificatePath, certInfo.ClientCertificatePassword); + return X509CertificateLoader.LoadPkcs12FromFile(certificatePath, certInfo.ClientCertificatePassword); } return null; } From 8ddd04b78eb3a2da3a6a2b7a7df99b63f3e30606 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Thu, 4 Dec 2025 19:43:30 +0100 Subject: [PATCH 03/27] Switch development location --- .../DevelopmentPersistenceLocations.cs | 4 ++-- .../DevelopmentPersistenceLocations.cs | 4 ++-- .../DevelopmentTransportLocations.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ServiceControl.Audit.Persistence/DevelopmentPersistenceLocations.cs b/src/ServiceControl.Audit.Persistence/DevelopmentPersistenceLocations.cs index 08925bde80..ffa49e2575 100644 --- a/src/ServiceControl.Audit.Persistence/DevelopmentPersistenceLocations.cs +++ b/src/ServiceControl.Audit.Persistence/DevelopmentPersistenceLocations.cs @@ -30,8 +30,8 @@ static DevelopmentPersistenceLocations() const string configuration = "Release"; #endif -#if NET8_0 - const string framework = "net8.0"; +#if NET10_0 + const string framework = "net10.0"; #endif } } diff --git a/src/ServiceControl.Persistence/DevelopmentPersistenceLocations.cs b/src/ServiceControl.Persistence/DevelopmentPersistenceLocations.cs index 14f31e9f1b..451009ee88 100644 --- a/src/ServiceControl.Persistence/DevelopmentPersistenceLocations.cs +++ b/src/ServiceControl.Persistence/DevelopmentPersistenceLocations.cs @@ -29,8 +29,8 @@ static DevelopmentPersistenceLocations() const string configuration = "Release"; #endif -#if NET8_0 - const string framework = "net8.0"; +#if NET10_0 + const string framework = "net10.0"; #endif } } diff --git a/src/ServiceControl.Transports/DevelopmentTransportLocations.cs b/src/ServiceControl.Transports/DevelopmentTransportLocations.cs index f58bcff9bd..b7b1821cda 100644 --- a/src/ServiceControl.Transports/DevelopmentTransportLocations.cs +++ b/src/ServiceControl.Transports/DevelopmentTransportLocations.cs @@ -36,8 +36,8 @@ static DevelopmentTransportLocations() const string configuration = "Release"; #endif -#if NET8_0 - const string framework = "net8.0"; +#if NET10_0 + const string framework = "net10.0"; #endif } } From 9829133dac98e77f05a45a9ba2750b5b372bc89d Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Thu, 4 Dec 2025 19:43:37 +0100 Subject: [PATCH 04/27] Use field --- src/ServiceControl.Transports/TransportSettings.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ServiceControl.Transports/TransportSettings.cs b/src/ServiceControl.Transports/TransportSettings.cs index eaa94cac91..1e16d72476 100644 --- a/src/ServiceControl.Transports/TransportSettings.cs +++ b/src/ServiceControl.Transports/TransportSettings.cs @@ -20,10 +20,8 @@ public class TransportSettings : SettingsHolder public string ErrorQueue { - set => customErrorQueue = value; - get => string.IsNullOrEmpty(customErrorQueue) ? $"{EndpointName}.Errors" : customErrorQueue; + set; + get => string.IsNullOrEmpty(field) ? $"{EndpointName}.Errors" : field; } - - string customErrorQueue; } } \ No newline at end of file From 94a222fdf23704a36d49784962aab3a385686c77 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Thu, 4 Dec 2025 19:45:57 +0100 Subject: [PATCH 05/27] Upgrade csproj --- src/HealthCheckApp/HealthCheckApp.csproj | 2 +- src/LegacyArtifacts/LegacyArtifacts.csproj | 2 +- .../Particular.LicensingComponent.Contracts.csproj | 2 +- .../Particular.LicensingComponent.Persistence.InMemory.csproj | 2 +- .../Particular.LicensingComponent.Persistence.csproj | 2 +- .../Particular.LicensingComponent.UnitTests.csproj | 2 +- .../Particular.LicensingComponent.csproj | 2 +- .../Particular.PlatformSample.ServiceControl.csproj | 2 +- .../ServiceControl.AcceptanceTesting.csproj | 2 +- .../ServiceControl.AcceptanceTests.RavenDB.csproj | 2 +- src/ServiceControl.Api/ServiceControl.Api.csproj | 2 +- .../ServiceControl.Audit.AcceptanceTests.RavenDB.csproj | 2 +- .../ServiceControl.Audit.AcceptanceTests.csproj | 2 +- .../ServiceControl.Audit.Persistence.InMemory.csproj | 2 +- .../ServiceControl.Audit.Persistence.RavenDB.csproj | 2 +- .../ServiceControl.Audit.Persistence.SagaAudit.csproj | 2 +- .../ServiceControl.Audit.Persistence.Tests.RavenDB.csproj | 2 +- .../ServiceControl.Audit.Persistence.Tests.csproj | 2 +- .../ServiceControl.Audit.Persistence.csproj | 2 +- .../ServiceControl.Audit.UnitTests.csproj | 2 +- src/ServiceControl.Audit/ServiceControl.Audit.csproj | 2 +- .../ServiceControl.DomainEvents.csproj | 2 +- src/ServiceControl.Hosting/ServiceControl.Hosting.csproj | 2 +- .../ServiceControl.Infrastructure.Metrics.csproj | 2 +- .../ServiceControl.Infrastructure.Tests.csproj | 2 +- .../ServiceControl.Infrastructure.csproj | 2 +- .../ServiceControl.LicenseManagement.csproj | 2 +- .../ServiceControl.Monitoring.AcceptanceTests.csproj | 2 +- .../ServiceControl.Monitoring.UnitTests.csproj | 2 +- src/ServiceControl.Monitoring/ServiceControl.Monitoring.csproj | 2 +- .../ServiceControl.MultiInstance.AcceptanceTests.csproj | 2 +- .../ServiceControl.Persistence.RavenDB.csproj | 2 +- .../ServiceControl.Persistence.Tests.InMemory.csproj | 2 +- .../ServiceControl.Persistence.Tests.RavenDB.csproj | 2 +- .../ServiceControl.Persistence.csproj | 2 +- src/ServiceControl.RavenDB/ServiceControl.RavenDB.csproj | 2 +- src/ServiceControl.SagaAudit/ServiceControl.SagaAudit.csproj | 2 +- .../ServiceControl.Transports.ASBS.Tests.csproj | 2 +- .../ServiceControl.Transports.ASBS.csproj | 2 +- .../ServiceControl.Transports.ASQ.Tests.csproj | 2 +- .../ServiceControl.Transports.ASQ.csproj | 2 +- .../ServiceControl.Transports.Learning.csproj | 2 +- .../ServiceControl.Transports.PostgreSql.Tests.csproj | 2 +- .../ServiceControl.Transports.PostgreSql.csproj | 2 +- .../ServiceControl.Transports.RabbitMQ.csproj | 2 +- ...ol.Transports.RabbitMQClassicConventionalRoutingTests.csproj | 2 +- ...Control.Transports.RabbitMQClassicDirectRouting.Tests.csproj | 2 +- ...ol.Transports.RabbitMQQuorumConventionalRouting.Tests.csproj | 2 +- ...eControl.Transports.RabbitMQQuorumDirectRouting.Tests.csproj | 2 +- .../ServiceControl.Transports.SQS.Tests.csproj | 2 +- .../ServiceControl.Transports.SQS.csproj | 2 +- .../ServiceControl.Transports.SqlServer.Tests.csproj | 2 +- .../ServiceControl.Transports.SqlServer.csproj | 2 +- .../ServiceControl.Transports.Tests.csproj | 2 +- src/ServiceControl.Transports/ServiceControl.Transports.csproj | 2 +- src/ServiceControl.UnitTests/ServiceControl.UnitTests.csproj | 2 +- src/ServiceControl/ServiceControl.csproj | 2 +- .../ServiceControlInstaller.Packaging.UnitTests.csproj | 2 +- .../ServiceControlInstaller.Packaging.csproj | 2 +- src/SetupProcessFake/SetupProcessFake.csproj | 2 +- src/TestHelper/TestHelper.csproj | 2 +- 61 files changed, 61 insertions(+), 61 deletions(-) diff --git a/src/HealthCheckApp/HealthCheckApp.csproj b/src/HealthCheckApp/HealthCheckApp.csproj index 36afb44b63..5352174fdb 100644 --- a/src/HealthCheckApp/HealthCheckApp.csproj +++ b/src/HealthCheckApp/HealthCheckApp.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 Exe enable enable diff --git a/src/LegacyArtifacts/LegacyArtifacts.csproj b/src/LegacyArtifacts/LegacyArtifacts.csproj index 0cd86458b8..b94ffb1b37 100644 --- a/src/LegacyArtifacts/LegacyArtifacts.csproj +++ b/src/LegacyArtifacts/LegacyArtifacts.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/Particular.LicensingComponent.Contracts/Particular.LicensingComponent.Contracts.csproj b/src/Particular.LicensingComponent.Contracts/Particular.LicensingComponent.Contracts.csproj index 3c088c55b2..6441ca3979 100644 --- a/src/Particular.LicensingComponent.Contracts/Particular.LicensingComponent.Contracts.csproj +++ b/src/Particular.LicensingComponent.Contracts/Particular.LicensingComponent.Contracts.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 enable enable diff --git a/src/Particular.LicensingComponent.Persistence.InMemory/Particular.LicensingComponent.Persistence.InMemory.csproj b/src/Particular.LicensingComponent.Persistence.InMemory/Particular.LicensingComponent.Persistence.InMemory.csproj index 58fa65af4b..8ad8e5b9ec 100644 --- a/src/Particular.LicensingComponent.Persistence.InMemory/Particular.LicensingComponent.Persistence.InMemory.csproj +++ b/src/Particular.LicensingComponent.Persistence.InMemory/Particular.LicensingComponent.Persistence.InMemory.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 enable diff --git a/src/Particular.LicensingComponent.Persistence/Particular.LicensingComponent.Persistence.csproj b/src/Particular.LicensingComponent.Persistence/Particular.LicensingComponent.Persistence.csproj index b917294326..d78b5dbd7a 100644 --- a/src/Particular.LicensingComponent.Persistence/Particular.LicensingComponent.Persistence.csproj +++ b/src/Particular.LicensingComponent.Persistence/Particular.LicensingComponent.Persistence.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 enable enable diff --git a/src/Particular.LicensingComponent.UnitTests/Particular.LicensingComponent.UnitTests.csproj b/src/Particular.LicensingComponent.UnitTests/Particular.LicensingComponent.UnitTests.csproj index 5966340fa9..001cb3ec24 100644 --- a/src/Particular.LicensingComponent.UnitTests/Particular.LicensingComponent.UnitTests.csproj +++ b/src/Particular.LicensingComponent.UnitTests/Particular.LicensingComponent.UnitTests.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/Particular.LicensingComponent/Particular.LicensingComponent.csproj b/src/Particular.LicensingComponent/Particular.LicensingComponent.csproj index 90f18b9547..4f87cd4a63 100644 --- a/src/Particular.LicensingComponent/Particular.LicensingComponent.csproj +++ b/src/Particular.LicensingComponent/Particular.LicensingComponent.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 enable enable diff --git a/src/Particular.PlatformSample.ServiceControl/Particular.PlatformSample.ServiceControl.csproj b/src/Particular.PlatformSample.ServiceControl/Particular.PlatformSample.ServiceControl.csproj index 181aad17cd..d6fd363f8e 100644 --- a/src/Particular.PlatformSample.ServiceControl/Particular.PlatformSample.ServiceControl.csproj +++ b/src/Particular.PlatformSample.ServiceControl/Particular.PlatformSample.ServiceControl.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 false Particular ServiceControl binaries for use by Particular.PlatformSample. Not intended for use outside of Particular.PlatformSample. https://docs.particular.net/servicecontrol/ diff --git a/src/ServiceControl.AcceptanceTesting/ServiceControl.AcceptanceTesting.csproj b/src/ServiceControl.AcceptanceTesting/ServiceControl.AcceptanceTesting.csproj index fb3544fabd..7c6db54c54 100644 --- a/src/ServiceControl.AcceptanceTesting/ServiceControl.AcceptanceTesting.csproj +++ b/src/ServiceControl.AcceptanceTesting/ServiceControl.AcceptanceTesting.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.AcceptanceTests.RavenDB/ServiceControl.AcceptanceTests.RavenDB.csproj b/src/ServiceControl.AcceptanceTests.RavenDB/ServiceControl.AcceptanceTests.RavenDB.csproj index 3dc48639d3..f8033e858f 100644 --- a/src/ServiceControl.AcceptanceTests.RavenDB/ServiceControl.AcceptanceTests.RavenDB.csproj +++ b/src/ServiceControl.AcceptanceTests.RavenDB/ServiceControl.AcceptanceTests.RavenDB.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Api/ServiceControl.Api.csproj b/src/ServiceControl.Api/ServiceControl.Api.csproj index ae2821edbb..00b9359e9d 100644 --- a/src/ServiceControl.Api/ServiceControl.Api.csproj +++ b/src/ServiceControl.Api/ServiceControl.Api.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Audit.AcceptanceTests.RavenDB/ServiceControl.Audit.AcceptanceTests.RavenDB.csproj b/src/ServiceControl.Audit.AcceptanceTests.RavenDB/ServiceControl.Audit.AcceptanceTests.RavenDB.csproj index a2b1aeea52..223e117c20 100644 --- a/src/ServiceControl.Audit.AcceptanceTests.RavenDB/ServiceControl.Audit.AcceptanceTests.RavenDB.csproj +++ b/src/ServiceControl.Audit.AcceptanceTests.RavenDB/ServiceControl.Audit.AcceptanceTests.RavenDB.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Audit.AcceptanceTests/ServiceControl.Audit.AcceptanceTests.csproj b/src/ServiceControl.Audit.AcceptanceTests/ServiceControl.Audit.AcceptanceTests.csproj index 009d88af24..2bbf59bc45 100644 --- a/src/ServiceControl.Audit.AcceptanceTests/ServiceControl.Audit.AcceptanceTests.csproj +++ b/src/ServiceControl.Audit.AcceptanceTests/ServiceControl.Audit.AcceptanceTests.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Audit.Persistence.InMemory/ServiceControl.Audit.Persistence.InMemory.csproj b/src/ServiceControl.Audit.Persistence.InMemory/ServiceControl.Audit.Persistence.InMemory.csproj index b2232a9098..f4f86456e4 100644 --- a/src/ServiceControl.Audit.Persistence.InMemory/ServiceControl.Audit.Persistence.InMemory.csproj +++ b/src/ServiceControl.Audit.Persistence.InMemory/ServiceControl.Audit.Persistence.InMemory.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 true true diff --git a/src/ServiceControl.Audit.Persistence.RavenDB/ServiceControl.Audit.Persistence.RavenDB.csproj b/src/ServiceControl.Audit.Persistence.RavenDB/ServiceControl.Audit.Persistence.RavenDB.csproj index 86bddad1d8..f7e9dc94c3 100644 --- a/src/ServiceControl.Audit.Persistence.RavenDB/ServiceControl.Audit.Persistence.RavenDB.csproj +++ b/src/ServiceControl.Audit.Persistence.RavenDB/ServiceControl.Audit.Persistence.RavenDB.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 true true diff --git a/src/ServiceControl.Audit.Persistence.SagaAudit/ServiceControl.Audit.Persistence.SagaAudit.csproj b/src/ServiceControl.Audit.Persistence.SagaAudit/ServiceControl.Audit.Persistence.SagaAudit.csproj index 133b718016..2621525920 100644 --- a/src/ServiceControl.Audit.Persistence.SagaAudit/ServiceControl.Audit.Persistence.SagaAudit.csproj +++ b/src/ServiceControl.Audit.Persistence.SagaAudit/ServiceControl.Audit.Persistence.SagaAudit.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 \ No newline at end of file diff --git a/src/ServiceControl.Audit.Persistence.Tests.RavenDB/ServiceControl.Audit.Persistence.Tests.RavenDB.csproj b/src/ServiceControl.Audit.Persistence.Tests.RavenDB/ServiceControl.Audit.Persistence.Tests.RavenDB.csproj index 2be118b171..7b0f2fbb6a 100644 --- a/src/ServiceControl.Audit.Persistence.Tests.RavenDB/ServiceControl.Audit.Persistence.Tests.RavenDB.csproj +++ b/src/ServiceControl.Audit.Persistence.Tests.RavenDB/ServiceControl.Audit.Persistence.Tests.RavenDB.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Audit.Persistence.Tests/ServiceControl.Audit.Persistence.Tests.csproj b/src/ServiceControl.Audit.Persistence.Tests/ServiceControl.Audit.Persistence.Tests.csproj index 99442e0b0a..46c08b9687 100644 --- a/src/ServiceControl.Audit.Persistence.Tests/ServiceControl.Audit.Persistence.Tests.csproj +++ b/src/ServiceControl.Audit.Persistence.Tests/ServiceControl.Audit.Persistence.Tests.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Audit.Persistence/ServiceControl.Audit.Persistence.csproj b/src/ServiceControl.Audit.Persistence/ServiceControl.Audit.Persistence.csproj index f3acca0c7b..ad7832ae08 100644 --- a/src/ServiceControl.Audit.Persistence/ServiceControl.Audit.Persistence.csproj +++ b/src/ServiceControl.Audit.Persistence/ServiceControl.Audit.Persistence.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Audit.UnitTests/ServiceControl.Audit.UnitTests.csproj b/src/ServiceControl.Audit.UnitTests/ServiceControl.Audit.UnitTests.csproj index 8263a7ec92..9e61b337c9 100644 --- a/src/ServiceControl.Audit.UnitTests/ServiceControl.Audit.UnitTests.csproj +++ b/src/ServiceControl.Audit.UnitTests/ServiceControl.Audit.UnitTests.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Audit/ServiceControl.Audit.csproj b/src/ServiceControl.Audit/ServiceControl.Audit.csproj index 7ea57b06f7..1752bf81bd 100644 --- a/src/ServiceControl.Audit/ServiceControl.Audit.csproj +++ b/src/ServiceControl.Audit/ServiceControl.Audit.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 Exe Operations.ico diff --git a/src/ServiceControl.DomainEvents/ServiceControl.DomainEvents.csproj b/src/ServiceControl.DomainEvents/ServiceControl.DomainEvents.csproj index bb654606ec..afe83e1426 100644 --- a/src/ServiceControl.DomainEvents/ServiceControl.DomainEvents.csproj +++ b/src/ServiceControl.DomainEvents/ServiceControl.DomainEvents.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Hosting/ServiceControl.Hosting.csproj b/src/ServiceControl.Hosting/ServiceControl.Hosting.csproj index 074686312c..817b54239a 100644 --- a/src/ServiceControl.Hosting/ServiceControl.Hosting.csproj +++ b/src/ServiceControl.Hosting/ServiceControl.Hosting.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Infrastructure.Metrics/ServiceControl.Infrastructure.Metrics.csproj b/src/ServiceControl.Infrastructure.Metrics/ServiceControl.Infrastructure.Metrics.csproj index 58990cd569..4340f62396 100644 --- a/src/ServiceControl.Infrastructure.Metrics/ServiceControl.Infrastructure.Metrics.csproj +++ b/src/ServiceControl.Infrastructure.Metrics/ServiceControl.Infrastructure.Metrics.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 diff --git a/src/ServiceControl.Infrastructure.Tests/ServiceControl.Infrastructure.Tests.csproj b/src/ServiceControl.Infrastructure.Tests/ServiceControl.Infrastructure.Tests.csproj index bec2b80d02..4cddac2b26 100644 --- a/src/ServiceControl.Infrastructure.Tests/ServiceControl.Infrastructure.Tests.csproj +++ b/src/ServiceControl.Infrastructure.Tests/ServiceControl.Infrastructure.Tests.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Infrastructure/ServiceControl.Infrastructure.csproj b/src/ServiceControl.Infrastructure/ServiceControl.Infrastructure.csproj index 225a545bd9..ffdc49b0d9 100644 --- a/src/ServiceControl.Infrastructure/ServiceControl.Infrastructure.csproj +++ b/src/ServiceControl.Infrastructure/ServiceControl.Infrastructure.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 true ..\NServiceBus.snk diff --git a/src/ServiceControl.LicenseManagement/ServiceControl.LicenseManagement.csproj b/src/ServiceControl.LicenseManagement/ServiceControl.LicenseManagement.csproj index a49a0eea73..f0b8d17230 100644 --- a/src/ServiceControl.LicenseManagement/ServiceControl.LicenseManagement.csproj +++ b/src/ServiceControl.LicenseManagement/ServiceControl.LicenseManagement.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 diff --git a/src/ServiceControl.Monitoring.AcceptanceTests/ServiceControl.Monitoring.AcceptanceTests.csproj b/src/ServiceControl.Monitoring.AcceptanceTests/ServiceControl.Monitoring.AcceptanceTests.csproj index b422a1e581..5a43cc1e97 100644 --- a/src/ServiceControl.Monitoring.AcceptanceTests/ServiceControl.Monitoring.AcceptanceTests.csproj +++ b/src/ServiceControl.Monitoring.AcceptanceTests/ServiceControl.Monitoring.AcceptanceTests.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Monitoring.UnitTests/ServiceControl.Monitoring.UnitTests.csproj b/src/ServiceControl.Monitoring.UnitTests/ServiceControl.Monitoring.UnitTests.csproj index c0f8ffb9de..25d2bb6b22 100644 --- a/src/ServiceControl.Monitoring.UnitTests/ServiceControl.Monitoring.UnitTests.csproj +++ b/src/ServiceControl.Monitoring.UnitTests/ServiceControl.Monitoring.UnitTests.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Monitoring/ServiceControl.Monitoring.csproj b/src/ServiceControl.Monitoring/ServiceControl.Monitoring.csproj index 1a9b705469..566d603e07 100644 --- a/src/ServiceControl.Monitoring/ServiceControl.Monitoring.csproj +++ b/src/ServiceControl.Monitoring/ServiceControl.Monitoring.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 Exe Operations.ico diff --git a/src/ServiceControl.MultiInstance.AcceptanceTests/ServiceControl.MultiInstance.AcceptanceTests.csproj b/src/ServiceControl.MultiInstance.AcceptanceTests/ServiceControl.MultiInstance.AcceptanceTests.csproj index caf170a5d6..10b78c9ba4 100644 --- a/src/ServiceControl.MultiInstance.AcceptanceTests/ServiceControl.MultiInstance.AcceptanceTests.csproj +++ b/src/ServiceControl.MultiInstance.AcceptanceTests/ServiceControl.MultiInstance.AcceptanceTests.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Persistence.RavenDB/ServiceControl.Persistence.RavenDB.csproj b/src/ServiceControl.Persistence.RavenDB/ServiceControl.Persistence.RavenDB.csproj index df290177d9..2c9a2273c9 100644 --- a/src/ServiceControl.Persistence.RavenDB/ServiceControl.Persistence.RavenDB.csproj +++ b/src/ServiceControl.Persistence.RavenDB/ServiceControl.Persistence.RavenDB.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 true true diff --git a/src/ServiceControl.Persistence.Tests.InMemory/ServiceControl.Persistence.Tests.InMemory.csproj b/src/ServiceControl.Persistence.Tests.InMemory/ServiceControl.Persistence.Tests.InMemory.csproj index 14f8701c33..7451f9c672 100644 --- a/src/ServiceControl.Persistence.Tests.InMemory/ServiceControl.Persistence.Tests.InMemory.csproj +++ b/src/ServiceControl.Persistence.Tests.InMemory/ServiceControl.Persistence.Tests.InMemory.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Persistence.Tests.RavenDB/ServiceControl.Persistence.Tests.RavenDB.csproj b/src/ServiceControl.Persistence.Tests.RavenDB/ServiceControl.Persistence.Tests.RavenDB.csproj index f3ed716dde..5631e1959c 100644 --- a/src/ServiceControl.Persistence.Tests.RavenDB/ServiceControl.Persistence.Tests.RavenDB.csproj +++ b/src/ServiceControl.Persistence.Tests.RavenDB/ServiceControl.Persistence.Tests.RavenDB.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Persistence/ServiceControl.Persistence.csproj b/src/ServiceControl.Persistence/ServiceControl.Persistence.csproj index 1806eaf133..f32e653492 100644 --- a/src/ServiceControl.Persistence/ServiceControl.Persistence.csproj +++ b/src/ServiceControl.Persistence/ServiceControl.Persistence.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.RavenDB/ServiceControl.RavenDB.csproj b/src/ServiceControl.RavenDB/ServiceControl.RavenDB.csproj index 0479c4ff74..4e0e805a76 100644 --- a/src/ServiceControl.RavenDB/ServiceControl.RavenDB.csproj +++ b/src/ServiceControl.RavenDB/ServiceControl.RavenDB.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 enable diff --git a/src/ServiceControl.SagaAudit/ServiceControl.SagaAudit.csproj b/src/ServiceControl.SagaAudit/ServiceControl.SagaAudit.csproj index e72ea86d64..ea3f1bb824 100644 --- a/src/ServiceControl.SagaAudit/ServiceControl.SagaAudit.csproj +++ b/src/ServiceControl.SagaAudit/ServiceControl.SagaAudit.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Transports.ASBS.Tests/ServiceControl.Transports.ASBS.Tests.csproj b/src/ServiceControl.Transports.ASBS.Tests/ServiceControl.Transports.ASBS.Tests.csproj index eb5e30a4ce..ab7b1287ac 100644 --- a/src/ServiceControl.Transports.ASBS.Tests/ServiceControl.Transports.ASBS.Tests.csproj +++ b/src/ServiceControl.Transports.ASBS.Tests/ServiceControl.Transports.ASBS.Tests.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Transports.ASBS/ServiceControl.Transports.ASBS.csproj b/src/ServiceControl.Transports.ASBS/ServiceControl.Transports.ASBS.csproj index a338339ece..a0404ac4a0 100644 --- a/src/ServiceControl.Transports.ASBS/ServiceControl.Transports.ASBS.csproj +++ b/src/ServiceControl.Transports.ASBS/ServiceControl.Transports.ASBS.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 true diff --git a/src/ServiceControl.Transports.ASQ.Tests/ServiceControl.Transports.ASQ.Tests.csproj b/src/ServiceControl.Transports.ASQ.Tests/ServiceControl.Transports.ASQ.Tests.csproj index 46a71362fd..62746ec6ed 100644 --- a/src/ServiceControl.Transports.ASQ.Tests/ServiceControl.Transports.ASQ.Tests.csproj +++ b/src/ServiceControl.Transports.ASQ.Tests/ServiceControl.Transports.ASQ.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 diff --git a/src/ServiceControl.Transports.ASQ/ServiceControl.Transports.ASQ.csproj b/src/ServiceControl.Transports.ASQ/ServiceControl.Transports.ASQ.csproj index 2c7e270766..3d118c7bb0 100644 --- a/src/ServiceControl.Transports.ASQ/ServiceControl.Transports.ASQ.csproj +++ b/src/ServiceControl.Transports.ASQ/ServiceControl.Transports.ASQ.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 true diff --git a/src/ServiceControl.Transports.Learning/ServiceControl.Transports.Learning.csproj b/src/ServiceControl.Transports.Learning/ServiceControl.Transports.Learning.csproj index 3f8b4b2805..c0f4a594d7 100644 --- a/src/ServiceControl.Transports.Learning/ServiceControl.Transports.Learning.csproj +++ b/src/ServiceControl.Transports.Learning/ServiceControl.Transports.Learning.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 true diff --git a/src/ServiceControl.Transports.PostgreSql.Tests/ServiceControl.Transports.PostgreSql.Tests.csproj b/src/ServiceControl.Transports.PostgreSql.Tests/ServiceControl.Transports.PostgreSql.Tests.csproj index 7a3acb266d..11dab43a89 100644 --- a/src/ServiceControl.Transports.PostgreSql.Tests/ServiceControl.Transports.PostgreSql.Tests.csproj +++ b/src/ServiceControl.Transports.PostgreSql.Tests/ServiceControl.Transports.PostgreSql.Tests.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Transports.PostgreSql/ServiceControl.Transports.PostgreSql.csproj b/src/ServiceControl.Transports.PostgreSql/ServiceControl.Transports.PostgreSql.csproj index 1fa0bde372..b29d5d7624 100644 --- a/src/ServiceControl.Transports.PostgreSql/ServiceControl.Transports.PostgreSql.csproj +++ b/src/ServiceControl.Transports.PostgreSql/ServiceControl.Transports.PostgreSql.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 true diff --git a/src/ServiceControl.Transports.RabbitMQ/ServiceControl.Transports.RabbitMQ.csproj b/src/ServiceControl.Transports.RabbitMQ/ServiceControl.Transports.RabbitMQ.csproj index 3450935934..7a7994e7c1 100644 --- a/src/ServiceControl.Transports.RabbitMQ/ServiceControl.Transports.RabbitMQ.csproj +++ b/src/ServiceControl.Transports.RabbitMQ/ServiceControl.Transports.RabbitMQ.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 true ..\NServiceBus.snk true diff --git a/src/ServiceControl.Transports.RabbitMQClassicConventionalRouting.Tests/ServiceControl.Transports.RabbitMQClassicConventionalRoutingTests.csproj b/src/ServiceControl.Transports.RabbitMQClassicConventionalRouting.Tests/ServiceControl.Transports.RabbitMQClassicConventionalRoutingTests.csproj index 32f68e736f..0870cd1fd0 100644 --- a/src/ServiceControl.Transports.RabbitMQClassicConventionalRouting.Tests/ServiceControl.Transports.RabbitMQClassicConventionalRoutingTests.csproj +++ b/src/ServiceControl.Transports.RabbitMQClassicConventionalRouting.Tests/ServiceControl.Transports.RabbitMQClassicConventionalRoutingTests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 diff --git a/src/ServiceControl.Transports.RabbitMQClassicDirectRouting.Tests/ServiceControl.Transports.RabbitMQClassicDirectRouting.Tests.csproj b/src/ServiceControl.Transports.RabbitMQClassicDirectRouting.Tests/ServiceControl.Transports.RabbitMQClassicDirectRouting.Tests.csproj index 228f477de6..ac242b940d 100644 --- a/src/ServiceControl.Transports.RabbitMQClassicDirectRouting.Tests/ServiceControl.Transports.RabbitMQClassicDirectRouting.Tests.csproj +++ b/src/ServiceControl.Transports.RabbitMQClassicDirectRouting.Tests/ServiceControl.Transports.RabbitMQClassicDirectRouting.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 diff --git a/src/ServiceControl.Transports.RabbitMQQuorumConventionalRouting.Tests/ServiceControl.Transports.RabbitMQQuorumConventionalRouting.Tests.csproj b/src/ServiceControl.Transports.RabbitMQQuorumConventionalRouting.Tests/ServiceControl.Transports.RabbitMQQuorumConventionalRouting.Tests.csproj index 228f477de6..ac242b940d 100644 --- a/src/ServiceControl.Transports.RabbitMQQuorumConventionalRouting.Tests/ServiceControl.Transports.RabbitMQQuorumConventionalRouting.Tests.csproj +++ b/src/ServiceControl.Transports.RabbitMQQuorumConventionalRouting.Tests/ServiceControl.Transports.RabbitMQQuorumConventionalRouting.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 diff --git a/src/ServiceControl.Transports.RabbitMQQuorumDirectRouting.Tests/ServiceControl.Transports.RabbitMQQuorumDirectRouting.Tests.csproj b/src/ServiceControl.Transports.RabbitMQQuorumDirectRouting.Tests/ServiceControl.Transports.RabbitMQQuorumDirectRouting.Tests.csproj index 32f68e736f..0870cd1fd0 100644 --- a/src/ServiceControl.Transports.RabbitMQQuorumDirectRouting.Tests/ServiceControl.Transports.RabbitMQQuorumDirectRouting.Tests.csproj +++ b/src/ServiceControl.Transports.RabbitMQQuorumDirectRouting.Tests/ServiceControl.Transports.RabbitMQQuorumDirectRouting.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 diff --git a/src/ServiceControl.Transports.SQS.Tests/ServiceControl.Transports.SQS.Tests.csproj b/src/ServiceControl.Transports.SQS.Tests/ServiceControl.Transports.SQS.Tests.csproj index 655018e20c..839cd53241 100644 --- a/src/ServiceControl.Transports.SQS.Tests/ServiceControl.Transports.SQS.Tests.csproj +++ b/src/ServiceControl.Transports.SQS.Tests/ServiceControl.Transports.SQS.Tests.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Transports.SQS/ServiceControl.Transports.SQS.csproj b/src/ServiceControl.Transports.SQS/ServiceControl.Transports.SQS.csproj index 7b9de90780..558955213a 100644 --- a/src/ServiceControl.Transports.SQS/ServiceControl.Transports.SQS.csproj +++ b/src/ServiceControl.Transports.SQS/ServiceControl.Transports.SQS.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 true diff --git a/src/ServiceControl.Transports.SqlServer.Tests/ServiceControl.Transports.SqlServer.Tests.csproj b/src/ServiceControl.Transports.SqlServer.Tests/ServiceControl.Transports.SqlServer.Tests.csproj index 2809591d0f..f7be8bcb3c 100644 --- a/src/ServiceControl.Transports.SqlServer.Tests/ServiceControl.Transports.SqlServer.Tests.csproj +++ b/src/ServiceControl.Transports.SqlServer.Tests/ServiceControl.Transports.SqlServer.Tests.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Transports.SqlServer/ServiceControl.Transports.SqlServer.csproj b/src/ServiceControl.Transports.SqlServer/ServiceControl.Transports.SqlServer.csproj index 99ff522110..fb0fd8ff89 100644 --- a/src/ServiceControl.Transports.SqlServer/ServiceControl.Transports.SqlServer.csproj +++ b/src/ServiceControl.Transports.SqlServer/ServiceControl.Transports.SqlServer.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 true diff --git a/src/ServiceControl.Transports.Tests/ServiceControl.Transports.Tests.csproj b/src/ServiceControl.Transports.Tests/ServiceControl.Transports.Tests.csproj index aedb05ec31..d90aec2273 100644 --- a/src/ServiceControl.Transports.Tests/ServiceControl.Transports.Tests.csproj +++ b/src/ServiceControl.Transports.Tests/ServiceControl.Transports.Tests.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl.Transports/ServiceControl.Transports.csproj b/src/ServiceControl.Transports/ServiceControl.Transports.csproj index 263429e5d4..59ddf05bd6 100644 --- a/src/ServiceControl.Transports/ServiceControl.Transports.csproj +++ b/src/ServiceControl.Transports/ServiceControl.Transports.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 true ..\NServiceBus.snk diff --git a/src/ServiceControl.UnitTests/ServiceControl.UnitTests.csproj b/src/ServiceControl.UnitTests/ServiceControl.UnitTests.csproj index 7de15bb542..98f8c01543 100644 --- a/src/ServiceControl.UnitTests/ServiceControl.UnitTests.csproj +++ b/src/ServiceControl.UnitTests/ServiceControl.UnitTests.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControl/ServiceControl.csproj b/src/ServiceControl/ServiceControl.csproj index 04f5956ccf..fb4f3d767c 100644 --- a/src/ServiceControl/ServiceControl.csproj +++ b/src/ServiceControl/ServiceControl.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 Exe Operations.ico true diff --git a/src/ServiceControlInstaller.Packaging.UnitTests/ServiceControlInstaller.Packaging.UnitTests.csproj b/src/ServiceControlInstaller.Packaging.UnitTests/ServiceControlInstaller.Packaging.UnitTests.csproj index 5ef875eb9c..76b172a166 100644 --- a/src/ServiceControlInstaller.Packaging.UnitTests/ServiceControlInstaller.Packaging.UnitTests.csproj +++ b/src/ServiceControlInstaller.Packaging.UnitTests/ServiceControlInstaller.Packaging.UnitTests.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/ServiceControlInstaller.Packaging/ServiceControlInstaller.Packaging.csproj b/src/ServiceControlInstaller.Packaging/ServiceControlInstaller.Packaging.csproj index d8069cbc9c..fd416f3082 100644 --- a/src/ServiceControlInstaller.Packaging/ServiceControlInstaller.Packaging.csproj +++ b/src/ServiceControlInstaller.Packaging/ServiceControlInstaller.Packaging.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 diff --git a/src/SetupProcessFake/SetupProcessFake.csproj b/src/SetupProcessFake/SetupProcessFake.csproj index 2f4fc77656..6c1dc922b1 100644 --- a/src/SetupProcessFake/SetupProcessFake.csproj +++ b/src/SetupProcessFake/SetupProcessFake.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 enable enable diff --git a/src/TestHelper/TestHelper.csproj b/src/TestHelper/TestHelper.csproj index 077bb6b110..ed363a805f 100644 --- a/src/TestHelper/TestHelper.csproj +++ b/src/TestHelper/TestHelper.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 From f6f3c891ee110c6a569b5d7fa054bf8fec61135d Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Thu, 4 Dec 2025 19:48:47 +0100 Subject: [PATCH 06/27] Null propagation --- .../ErrorMessagesDataStore.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ServiceControl.Persistence.RavenDB/ErrorMessagesDataStore.cs b/src/ServiceControl.Persistence.RavenDB/ErrorMessagesDataStore.cs index 4940807646..df59b8fdf9 100644 --- a/src/ServiceControl.Persistence.RavenDB/ErrorMessagesDataStore.cs +++ b/src/ServiceControl.Persistence.RavenDB/ErrorMessagesDataStore.cs @@ -592,10 +592,7 @@ public async Task RevertRetry(string messageUniqueId) using var session = await sessionProvider.OpenSession(); var failedMessage = await session .LoadAsync(FailedMessageIdGenerator.MakeDocumentId(messageUniqueId)); - if (failedMessage != null) - { - failedMessage.Status = FailedMessageStatus.Unresolved; - } + failedMessage?.Status = FailedMessageStatus.Unresolved; var failedMessageRetry = await session .LoadAsync(FailedMessageRetry.MakeDocumentId(messageUniqueId)); From b36a013f1b94d67e484cb91f05a34cfff4246e9d Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Thu, 4 Dec 2025 19:55:57 +0100 Subject: [PATCH 07/27] Proper TFM --- .../ServiceControl.Infrastructure.csproj | 2 +- .../ServiceControl.LicenseManagement.csproj | 2 +- .../ServiceControl.Transports.Msmq.Tests.csproj | 2 +- .../ServiceControl.Transports.Msmq.csproj | 2 +- src/SetupProcessFake/SetupProcessFake.csproj | 2 +- src/TestHelper/TestHelper.csproj | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ServiceControl.Infrastructure/ServiceControl.Infrastructure.csproj b/src/ServiceControl.Infrastructure/ServiceControl.Infrastructure.csproj index ffdc49b0d9..225a545bd9 100644 --- a/src/ServiceControl.Infrastructure/ServiceControl.Infrastructure.csproj +++ b/src/ServiceControl.Infrastructure/ServiceControl.Infrastructure.csproj @@ -1,7 +1,7 @@  - net10.0 + net8.0 true ..\NServiceBus.snk diff --git a/src/ServiceControl.LicenseManagement/ServiceControl.LicenseManagement.csproj b/src/ServiceControl.LicenseManagement/ServiceControl.LicenseManagement.csproj index f0b8d17230..a49a0eea73 100644 --- a/src/ServiceControl.LicenseManagement/ServiceControl.LicenseManagement.csproj +++ b/src/ServiceControl.LicenseManagement/ServiceControl.LicenseManagement.csproj @@ -1,7 +1,7 @@ - net10.0 + net8.0 diff --git a/src/ServiceControl.Transports.Msmq.Tests/ServiceControl.Transports.Msmq.Tests.csproj b/src/ServiceControl.Transports.Msmq.Tests/ServiceControl.Transports.Msmq.Tests.csproj index 308a68d4a2..835f728584 100644 --- a/src/ServiceControl.Transports.Msmq.Tests/ServiceControl.Transports.Msmq.Tests.csproj +++ b/src/ServiceControl.Transports.Msmq.Tests/ServiceControl.Transports.Msmq.Tests.csproj @@ -1,7 +1,7 @@  - net8.0-windows + net10.0-windows diff --git a/src/ServiceControl.Transports.Msmq/ServiceControl.Transports.Msmq.csproj b/src/ServiceControl.Transports.Msmq/ServiceControl.Transports.Msmq.csproj index 93b7a1d6bf..05ca9be29d 100644 --- a/src/ServiceControl.Transports.Msmq/ServiceControl.Transports.Msmq.csproj +++ b/src/ServiceControl.Transports.Msmq/ServiceControl.Transports.Msmq.csproj @@ -1,7 +1,7 @@  - net8.0-windows + net10.0-windows true diff --git a/src/SetupProcessFake/SetupProcessFake.csproj b/src/SetupProcessFake/SetupProcessFake.csproj index 6c1dc922b1..2f4fc77656 100644 --- a/src/SetupProcessFake/SetupProcessFake.csproj +++ b/src/SetupProcessFake/SetupProcessFake.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net8.0 enable enable diff --git a/src/TestHelper/TestHelper.csproj b/src/TestHelper/TestHelper.csproj index ed363a805f..077bb6b110 100644 --- a/src/TestHelper/TestHelper.csproj +++ b/src/TestHelper/TestHelper.csproj @@ -1,7 +1,7 @@ - net10.0 + net8.0 From ccb5dfabacfb07bd2d57b28b063eeebd73f0f535 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Thu, 4 Dec 2025 19:55:57 +0100 Subject: [PATCH 08/27] Remove now unnecessary package --- src/Directory.Packages.props | 1 - src/ServiceControl.UnitTests/ServiceControl.UnitTests.csproj | 1 - 2 files changed, 2 deletions(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index f5fedbd3a4..d0e40af160 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -72,7 +72,6 @@ - diff --git a/src/ServiceControl.UnitTests/ServiceControl.UnitTests.csproj b/src/ServiceControl.UnitTests/ServiceControl.UnitTests.csproj index 98f8c01543..5c3a965155 100644 --- a/src/ServiceControl.UnitTests/ServiceControl.UnitTests.csproj +++ b/src/ServiceControl.UnitTests/ServiceControl.UnitTests.csproj @@ -20,7 +20,6 @@ - From 025b3e2cf6142f5307c3191852b412b9dfb4171f Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Thu, 4 Dec 2025 19:56:41 +0100 Subject: [PATCH 09/27] Adjust to auto property --- .../Infrastructure/Settings/Settings.cs | 11 ++++------- .../Messages/ScatterGatherRemoteOnly.cs | 4 +--- .../Infrastructure/Settings/Settings.cs | 7 +++---- .../Retrying/Infrastructure/ErrorQueueNameCache.cs | 8 +++----- 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/src/ServiceControl.Audit/Infrastructure/Settings/Settings.cs b/src/ServiceControl.Audit/Infrastructure/Settings/Settings.cs index dd409f0334..a8f8b212ba 100644 --- a/src/ServiceControl.Audit/Infrastructure/Settings/Settings.cs +++ b/src/ServiceControl.Audit/Infrastructure/Settings/Settings.cs @@ -139,16 +139,16 @@ public int MaxBodySizeToStore { get { - if (maxBodySizeToStore <= 0) + if (field <= 0) { logger.LogError("MaxBodySizeToStore settings is invalid, 1 is the minimum value. Defaulting to {MaxBodySizeToStoreDefault}", MaxBodySizeToStoreDefault); return MaxBodySizeToStoreDefault; } - return maxBodySizeToStore; + return field; } - set => maxBodySizeToStore = value; - } + set; + } = SettingsReader.Read(SettingsRootNamespace, "MaxBodySizeToStore", MaxBodySizeToStoreDefault); public string InstanceName { get; init; } = DEFAULT_INSTANCE_NAME; @@ -290,9 +290,6 @@ static string Subscope(string address) // logger is intentionally not static to prevent it from being initialized before LoggingConfigurator.ConfigureLogging has been called readonly ILogger logger = LoggerUtil.CreateStaticLogger(); - - int maxBodySizeToStore = SettingsReader.Read(SettingsRootNamespace, "MaxBodySizeToStore", MaxBodySizeToStoreDefault); - public const string DEFAULT_INSTANCE_NAME = "Particular.ServiceControl.Audit"; public static readonly SettingsRootNamespace SettingsRootNamespace = new("ServiceControl.Audit"); diff --git a/src/ServiceControl/CompositeViews/Messages/ScatterGatherRemoteOnly.cs b/src/ServiceControl/CompositeViews/Messages/ScatterGatherRemoteOnly.cs index 3394ceb49e..ac48eb8c90 100644 --- a/src/ServiceControl/CompositeViews/Messages/ScatterGatherRemoteOnly.cs +++ b/src/ServiceControl/CompositeViews/Messages/ScatterGatherRemoteOnly.cs @@ -16,8 +16,6 @@ public abstract class ScatterGatherRemoteOnly(Settings settings, IHtt public sealed class NoOpStore { - public static NoOpStore Instance => instance ??= new NoOpStore(); - - static NoOpStore instance; + public static NoOpStore Instance => field ??= new NoOpStore(); } } \ No newline at end of file diff --git a/src/ServiceControl/Infrastructure/Settings/Settings.cs b/src/ServiceControl/Infrastructure/Settings/Settings.cs index 772d33203d..78a72edfbd 100644 --- a/src/ServiceControl/Infrastructure/Settings/Settings.cs +++ b/src/ServiceControl/Infrastructure/Settings/Settings.cs @@ -109,17 +109,16 @@ public string RootUrl public string ApiUrl => $"{RootUrl}api"; - string _instanceId; public string InstanceId { get { - if (string.IsNullOrEmpty(_instanceId)) + if (string.IsNullOrEmpty(field)) { - _instanceId = InstanceIdGenerator.FromApiUrl(ApiUrl); + field = InstanceIdGenerator.FromApiUrl(ApiUrl); } - return _instanceId; + return field; } } diff --git a/src/ServiceControl/Recoverability/Retrying/Infrastructure/ErrorQueueNameCache.cs b/src/ServiceControl/Recoverability/Retrying/Infrastructure/ErrorQueueNameCache.cs index 51adf69c19..7c8b004662 100644 --- a/src/ServiceControl/Recoverability/Retrying/Infrastructure/ErrorQueueNameCache.cs +++ b/src/ServiceControl/Recoverability/Retrying/Infrastructure/ErrorQueueNameCache.cs @@ -4,19 +4,17 @@ class ErrorQueueNameCache { - string resolvedErrorAddress; - public string ResolvedErrorAddress { get { - if (string.IsNullOrEmpty(resolvedErrorAddress)) + if (string.IsNullOrEmpty(field)) { throw new InvalidOperationException($"{nameof(ResolvedErrorAddress)} is not set. Please set it before accessing."); } - return resolvedErrorAddress; + return field; } - set => resolvedErrorAddress = value; + set; } } From f4148aa60cc3a6be474822e82ffc739bb21ca37b Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Thu, 4 Dec 2025 20:04:52 +0100 Subject: [PATCH 10/27] Build infra (parts) --- .github/workflows/ci.yml | 1 - global.json | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a33e862c78..3ba0c4877f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,6 @@ jobs: uses: actions/setup-dotnet@v5.0.1 with: global-json-file: global.json - dotnet-version: 8.0.x - name: Download RavenDB Server run: ./tools/download-ravendb-server.ps1 - name: Build diff --git a/global.json b/global.json index 188e0c1e24..11e3d8f94f 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,7 @@ { "sdk": { - "version": "9.0.100", + "version": "10.0.0", + "allowPrerelease": false, "rollForward": "latestFeature" }, "msbuild-sdks": { From e83c80c1712130a143af484d7b0ff57d39778314 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Thu, 4 Dec 2025 20:06:18 +0100 Subject: [PATCH 11/27] Use global.json more consistently --- .github/workflows/build-containers.yml | 1 - .github/workflows/build-db-container.yml | 1 - .github/workflows/build-windows.yml | 1 - .github/workflows/container-integration-test.yml | 1 - 4 files changed, 4 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index ec072b4d94..3a7a4d4740 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -39,7 +39,6 @@ jobs: uses: actions/setup-dotnet@v5.0.1 with: global-json-file: global.json - dotnet-version: 8.0.x - name: Run MinVer uses: Particular/run-minver-action@v1.0.0 - name: Validate build version diff --git a/.github/workflows/build-db-container.yml b/.github/workflows/build-db-container.yml index 1f9851f446..08f739d33c 100644 --- a/.github/workflows/build-db-container.yml +++ b/.github/workflows/build-db-container.yml @@ -23,7 +23,6 @@ jobs: uses: actions/setup-dotnet@v5.0.1 with: global-json-file: global.json - dotnet-version: 8.0.x - name: Run MinVer uses: Particular/run-minver-action@v1.0.0 - name: Validate build version diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 449cf27383..4fa81a7bb4 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -19,7 +19,6 @@ jobs: uses: actions/setup-dotnet@v5.0.1 with: global-json-file: global.json - dotnet-version: 8.0.x - name: Download RavenDB Server run: ./tools/download-ravendb-server.ps1 - name: Build diff --git a/.github/workflows/container-integration-test.yml b/.github/workflows/container-integration-test.yml index 68bf6ceb62..f3f23945f5 100644 --- a/.github/workflows/container-integration-test.yml +++ b/.github/workflows/container-integration-test.yml @@ -57,7 +57,6 @@ jobs: uses: actions/setup-dotnet@v5.0.1 with: global-json-file: global.json - dotnet-version: 8.0.x - name: Run MinVer uses: Particular/run-minver-action@v1.0.0 - name: Log in to GitHub container registry From fcd992731b219940a9a0a2f3cb32491fb0115894 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Thu, 4 Dec 2025 20:12:10 +0100 Subject: [PATCH 12/27] Switch base image --- .github/workflows/build-containers.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 3a7a4d4740..25b4d23b87 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -75,7 +75,7 @@ jobs: org.opencontainers.image.created=${{ steps.date.outputs.date }} org.opencontainers.image.title=${{ matrix.title }} org.opencontainers.image.description=${{ matrix.description }} - org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled-composite-extra + org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:10.0-jammy-noble-composite-extra annotations: | index:org.opencontainers.image.source=https://github.com/Particular/ServiceControl/tree/${{ github.sha }} index:org.opencontainers.image.authors="Particular Software" @@ -87,6 +87,6 @@ jobs: index:org.opencontainers.image.created=${{ steps.date.outputs.date }} index:org.opencontainers.image.title=${{ matrix.title }} index:org.opencontainers.image.description=${{ matrix.description }} - index:org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled-composite-extra + index:org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra file: src/${{ matrix.project }}/Dockerfile tags: ghcr.io/particular/${{ matrix.name }}:${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || env.MinVerVersion }} From 6d8936ffa6faad82a546217adfd188857c10a20e Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Thu, 4 Dec 2025 20:18:03 +0100 Subject: [PATCH 13/27] Flip dockerfiles and readme --- src/ServiceControl.Audit/Container-README.md | 2 +- src/ServiceControl.Audit/Dockerfile | 4 ++-- src/ServiceControl.Monitoring/Container-README.md | 2 +- src/ServiceControl.Monitoring/Dockerfile | 4 ++-- src/ServiceControl/Container-README.md | 2 +- src/ServiceControl/Dockerfile | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ServiceControl.Audit/Container-README.md b/src/ServiceControl.Audit/Container-README.md index b1710e9f03..51a56d36fd 100644 --- a/src/ServiceControl.Audit/Container-README.md +++ b/src/ServiceControl.Audit/Container-README.md @@ -46,7 +46,7 @@ The latest release within a minor version will be tagged with `{major}.{minor}` ## Image architecture -This image is a multi-arch image based on the [`mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled-composite-extra`](https://mcr.microsoft.com/en-us/product/dotnet/aspnet/about) base image supporting `linux/arm64` and `linux/amd64`. +This image is a multi-arch image based on the [`mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra`](https://mcr.microsoft.com/en-us/product/dotnet/aspnet/about) base image supporting `linux/arm64` and `linux/amd64`. ## Authors diff --git a/src/ServiceControl.Audit/Dockerfile b/src/ServiceControl.Audit/Dockerfile index ee39885596..410f789465 100644 --- a/src/ServiceControl.Audit/Dockerfile +++ b/src/ServiceControl.Audit/Dockerfile @@ -1,5 +1,5 @@ # Build image -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS build ARG TARGETARCH WORKDIR / ENV CI=true @@ -9,7 +9,7 @@ RUN dotnet build src/ServiceControl.Audit/ServiceControl.Audit.csproj --configur RUN dotnet publish src/HealthCheckApp/HealthCheckApp.csproj --arch $TARGETARCH --output /healthcheck # Runtime image -FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled-composite-extra +FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra WORKDIR /app EXPOSE 44444 diff --git a/src/ServiceControl.Monitoring/Container-README.md b/src/ServiceControl.Monitoring/Container-README.md index ef1af24479..bc3c223f15 100644 --- a/src/ServiceControl.Monitoring/Container-README.md +++ b/src/ServiceControl.Monitoring/Container-README.md @@ -45,7 +45,7 @@ The latest release within a minor version will be tagged with `{major}.{minor}` ## Image architecture -This image is a multi-arch image based on the [`mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled-composite-extra`](https://mcr.microsoft.com/en-us/product/dotnet/aspnet/about) base image supporting `linux/arm64` and `linux/amd64`. +This image is a multi-arch image based on the [`mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra`](https://mcr.microsoft.com/en-us/product/dotnet/aspnet/about) base image supporting `linux/arm64` and `linux/amd64`. ## Authors diff --git a/src/ServiceControl.Monitoring/Dockerfile b/src/ServiceControl.Monitoring/Dockerfile index 642083886e..f7fdaab4b0 100644 --- a/src/ServiceControl.Monitoring/Dockerfile +++ b/src/ServiceControl.Monitoring/Dockerfile @@ -1,5 +1,5 @@ # Build image -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS build ARG TARGETARCH WORKDIR / ENV CI=true @@ -9,7 +9,7 @@ RUN dotnet build src/ServiceControl.Monitoring/ServiceControl.Monitoring.csproj RUN dotnet publish src/HealthCheckApp/HealthCheckApp.csproj --arch $TARGETARCH --output /healthcheck # Runtime image -FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled-composite-extra +FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra WORKDIR /app EXPOSE 33633 diff --git a/src/ServiceControl/Container-README.md b/src/ServiceControl/Container-README.md index abe1dcdb3b..e0cf085e1a 100644 --- a/src/ServiceControl/Container-README.md +++ b/src/ServiceControl/Container-README.md @@ -47,7 +47,7 @@ The latest release within a minor version will be tagged with `{major}.{minor}` ## Image architecture -This image is a multi-arch image based on the [`mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled-composite-extra`](https://mcr.microsoft.com/en-us/product/dotnet/aspnet/about) base image supporting `linux/arm64` and `linux/amd64`. +This image is a multi-arch image based on the [`mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra`](https://mcr.microsoft.com/en-us/product/dotnet/aspnet/about) base image supporting `linux/arm64` and `linux/amd64`. ## Authors diff --git a/src/ServiceControl/Dockerfile b/src/ServiceControl/Dockerfile index 617c81063e..0f2330052c 100644 --- a/src/ServiceControl/Dockerfile +++ b/src/ServiceControl/Dockerfile @@ -1,5 +1,5 @@ # Build image -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0 AS build ARG TARGETARCH WORKDIR / ENV CI=true @@ -9,7 +9,7 @@ RUN dotnet build src/ServiceControl/ServiceControl.csproj --configuration Releas RUN dotnet publish src/HealthCheckApp/HealthCheckApp.csproj --arch $TARGETARCH --output /healthcheck # Runtime image -FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled-composite-extra +FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra WORKDIR /app EXPOSE 33333 From 45ed2f0afecf8f770903652bc9ec1db01b9e3191 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 5 Dec 2025 08:25:29 +0100 Subject: [PATCH 14/27] Correct tag Co-authored-by: Brandon Ording --- .github/workflows/build-containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 25b4d23b87..046158f9c4 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -75,7 +75,7 @@ jobs: org.opencontainers.image.created=${{ steps.date.outputs.date }} org.opencontainers.image.title=${{ matrix.title }} org.opencontainers.image.description=${{ matrix.description }} - org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:10.0-jammy-noble-composite-extra + org.opencontainers.image.base.name=mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled-composite-extra annotations: | index:org.opencontainers.image.source=https://github.com/Particular/ServiceControl/tree/${{ github.sha }} index:org.opencontainers.image.authors="Particular Software" From 12a09ed470b7e197392947e9c6851a63e2ca896a Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 5 Dec 2025 15:53:39 +0100 Subject: [PATCH 15/27] Pull up one more proj --- .../ServiceControl.Infrastructure.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ServiceControl.Infrastructure/ServiceControl.Infrastructure.csproj b/src/ServiceControl.Infrastructure/ServiceControl.Infrastructure.csproj index 225a545bd9..ffdc49b0d9 100644 --- a/src/ServiceControl.Infrastructure/ServiceControl.Infrastructure.csproj +++ b/src/ServiceControl.Infrastructure/ServiceControl.Infrastructure.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 true ..\NServiceBus.snk From 549801edb5929b259ac55c11064ee684cb48deea Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 5 Dec 2025 16:12:02 +0100 Subject: [PATCH 16/27] Upgrade a bunch of Microsoft packages --- src/Directory.Packages.props | 48 ++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index d0e40af160..3b31f2f820 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -17,22 +17,22 @@ - - - - - - - - - - - + + + + + + + + + + + - + @@ -69,29 +69,29 @@ - - - + + + - - - + + + - - - + + + - - + + - + From 3a2c85d9bfeb0a38fbe9d140102d82d3c8fbece9 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 5 Dec 2025 16:12:14 +0100 Subject: [PATCH 17/27] Make packaging NET8 --- .../ServiceControlInstaller.Packaging.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ServiceControlInstaller.Packaging/ServiceControlInstaller.Packaging.csproj b/src/ServiceControlInstaller.Packaging/ServiceControlInstaller.Packaging.csproj index fd416f3082..d8069cbc9c 100644 --- a/src/ServiceControlInstaller.Packaging/ServiceControlInstaller.Packaging.csproj +++ b/src/ServiceControlInstaller.Packaging/ServiceControlInstaller.Packaging.csproj @@ -1,7 +1,7 @@  - net10.0 + net8.0 From 2c7d56e3948c4e038aadc608ee2622a8f67526eb Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 5 Dec 2025 17:33:47 +0100 Subject: [PATCH 18/27] Another MS package --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 3b31f2f820..dc0b347916 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -72,7 +72,7 @@ - + From ac866f90148227d487df55ad7ceec8cff42d4aab Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 5 Dec 2025 17:34:03 +0100 Subject: [PATCH 19/27] Our packages plus some dependencies --- src/Directory.Packages.props | 42 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index dc0b347916..1ed9ff1c02 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -5,9 +5,9 @@ - - - + + + @@ -32,24 +32,24 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + From d11e7ccb076f1a7318066cbcc8fb1ffcc132a717 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 5 Dec 2025 17:46:51 +0100 Subject: [PATCH 20/27] Adjust acceptance tests --- .../When_a_failed_message_is_retried.cs | 47 +++++-------------- ...age_groups_are_sorted_by_a_web_api_call.cs | 1 + .../Is_System_Message_Tests.cs | 6 +-- .../When_a_SagaComplete_message_fails.cs | 6 ++- .../When_a_failed_message_is_pending_retry.cs | 14 ++---- .../When_a_message_has_failed.cs | 4 +- ...sage_has_failed_from_send_only_endpoint.cs | 4 +- .../When_a_messages_fails_multiple_times.cs | 2 +- .../When_a_retry_fails_to_be_sent.cs | 1 + ..._for_a_empty_body_message_is_successful.cs | 1 + ...n_event_with_multiple_subscribers_fails.cs | 2 +- ..._errors_with_same_uniqueid_are_imported.cs | 2 +- ...ing_failed_message_with_missing_headers.cs | 2 +- .../When_a_message_is_retried.cs | 7 ++- ...essage_is_retried_with_a_replyTo_header.cs | 7 ++- ...a_native_integration_message_is_retried.cs | 7 ++- .../When_single_message_fails_in_batch.cs | 2 +- ...en_a_message_sent_with_missing_metadata.cs | 4 +- ...ge_processed_successfully_from_sendonly.cs | 4 +- ..._messages_are_marked_as_system_messages.cs | 8 ++-- .../When_single_message_fails_in_batch.cs | 2 +- ..._a_message_emitted_by_a_saga_is_audited.cs | 4 +- ...hen_a_message_hitting_a_saga_is_audited.cs | 3 +- ...ssage_hitting_multiple_sagas_is_audited.cs | 6 ++- .../When_querying_disconnected_count.cs | 23 ++++----- ...en_sending_saga_audit_to_audit_instance.cs | 4 +- 26 files changed, 79 insertions(+), 94 deletions(-) diff --git a/src/ServiceControl.AcceptanceTests.RavenDB/Recoverability/MessageFailures/When_a_failed_message_is_retried.cs b/src/ServiceControl.AcceptanceTests.RavenDB/Recoverability/MessageFailures/When_a_failed_message_is_retried.cs index d7c9878f08..800deaf7ea 100644 --- a/src/ServiceControl.AcceptanceTests.RavenDB/Recoverability/MessageFailures/When_a_failed_message_is_retried.cs +++ b/src/ServiceControl.AcceptanceTests.RavenDB/Recoverability/MessageFailures/When_a_failed_message_is_retried.cs @@ -200,28 +200,21 @@ public FailingEndpoint() => c.GetSettings().Get().TransportTransactionMode = TransportTransactionMode.ReceiveOnly; c.EnableFeature(); + + c.RegisterStartupTask(new SendMessageAtStart()); + c.ReportSuccessfulRetriesToServiceControl(); c.NoRetries(); }); - class StartFeature : Feature + class SendMessageAtStart : FeatureStartupTask { - public StartFeature() => EnableByDefault(); - - protected override void Setup(FeatureConfigurationContext context) - { - context.RegisterStartupTask(new SendMessageAtStart()); - } + protected override Task OnStart(IMessageSession session, CancellationToken cancellationToken = default) + => session.SendLocal(new MyMessage(), cancellationToken); - class SendMessageAtStart : FeatureStartupTask - { - protected override Task OnStart(IMessageSession session, CancellationToken cancellationToken = default) - => session.SendLocal(new MyMessage(), cancellationToken); - - protected override Task OnStop(IMessageSession session, CancellationToken cancellationToken = default) - => Task.CompletedTask; - } + protected override Task OnStop(IMessageSession session, CancellationToken cancellationToken = default) + => Task.CompletedTask; } public class MyMessageHandler(Context scenarioContext, IReadOnlySettings settings) @@ -254,30 +247,16 @@ public FailingEndpointWithoutAudit() => TransportTransactionMode.ReceiveOnly; c.EnableFeature(); + c.RegisterStartupTask(new SendMessageAtStart()); + c.NoRetries(); }); - class StartFeature : Feature + class SendMessageAtStart : FeatureStartupTask { - public StartFeature() => EnableByDefault(); + protected override Task OnStart(IMessageSession session, CancellationToken cancellationToken = default) => session.SendLocal(new MyMessage(), cancellationToken); - protected override void Setup(FeatureConfigurationContext context) - { - context.RegisterStartupTask(new SendMessageAtStart()); - } - - class SendMessageAtStart : FeatureStartupTask - { - protected override Task OnStart(IMessageSession session, CancellationToken cancellationToken = default) - { - return session.SendLocal(new MyMessage(), cancellationToken); - } - - protected override Task OnStop(IMessageSession session, CancellationToken cancellationToken = default) - { - return Task.CompletedTask; - } - } + protected override Task OnStop(IMessageSession session, CancellationToken cancellationToken = default) => Task.CompletedTask; } public class MyMessageHandler(Context scenarioContext, IReadOnlySettings settings) diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/Groups/When_message_groups_are_sorted_by_a_web_api_call.cs b/src/ServiceControl.AcceptanceTests/Recoverability/Groups/When_message_groups_are_sorted_by_a_web_api_call.cs index f0427796d5..ac6e0b85e5 100644 --- a/src/ServiceControl.AcceptanceTests/Recoverability/Groups/When_message_groups_are_sorted_by_a_web_api_call.cs +++ b/src/ServiceControl.AcceptanceTests/Recoverability/Groups/When_message_groups_are_sorted_by_a_web_api_call.cs @@ -88,6 +88,7 @@ public class Receiver : EndpointConfigurationBuilder public Receiver() => EndpointSetup(c => { + c.EnableFeature(); c.NoRetries(); c.LimitMessageProcessingConcurrencyTo(1); }); diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/Is_System_Message_Tests.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/Is_System_Message_Tests.cs index 9e135ee046..a1226f66c2 100644 --- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/Is_System_Message_Tests.cs +++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/Is_System_Message_Tests.cs @@ -130,9 +130,9 @@ await Define(ctx => public class ServerEndpoint : EndpointConfigurationBuilder { - public ServerEndpoint() => EndpointSetup(); + public ServerEndpoint() => EndpointSetup(c => c.EnableFeature()); - class Foo : DispatchRawMessages + class SendMessage : DispatchRawMessages { protected override TransportOperations CreateMessage(SystemMessageTestContext context) { @@ -164,7 +164,7 @@ protected override TransportOperations CreateMessage(SystemMessageTestContext co headers[Headers.ControlMessageHeader] = context.ControlMessageHeaderValue != null && (bool)context.ControlMessageHeaderValue ? context.ControlMessageHeaderValue.ToString() : null; } - return new TransportOperations(new TransportOperation(new OutgoingMessage(context.MessageId, headers, new byte[0]), new UnicastAddressTag("error"))); + return new TransportOperations(new TransportOperation(new OutgoingMessage(context.MessageId, headers, Array.Empty()), new UnicastAddressTag("error"))); } } } diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_SagaComplete_message_fails.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_SagaComplete_message_fails.cs index fc137215e8..9a4fb727ff 100644 --- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_SagaComplete_message_fails.cs +++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_SagaComplete_message_fails.cs @@ -36,7 +36,11 @@ await Define() public class FailureEndpoint : EndpointConfigurationBuilder { - public FailureEndpoint() => EndpointSetup(c => { c.NoDelayedRetries(); }); + public FailureEndpoint() => EndpointSetup(c => + { + c.EnableFeature(); + c.NoDelayedRetries(); + }); public class SendFailedMessage : DispatchRawMessages { diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_failed_message_is_pending_retry.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_failed_message_is_pending_retry.cs index 1237d27c62..169039b832 100644 --- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_failed_message_is_pending_retry.cs +++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_failed_message_is_pending_retry.cs @@ -61,24 +61,18 @@ public FailingEndpoint() => c.GetSettings().Get().TransportTransactionMode = TransportTransactionMode.ReceiveOnly; c.EnableFeature(); + c.RegisterStartupTask(new SendMessageAtStart()); c.DisableFeature(); var recoverability = c.Recoverability(); recoverability.Immediate(s => s.NumberOfRetries(1)); recoverability.Delayed(s => s.NumberOfRetries(0)); }); - class StartFeature : Feature + class SendMessageAtStart : FeatureStartupTask { - public StartFeature() => EnableByDefault(); + protected override Task OnStart(IMessageSession session, CancellationToken cancellationToken = default) => session.SendLocal(new MyMessage(), cancellationToken); - protected override void Setup(FeatureConfigurationContext context) => context.RegisterStartupTask(new SendMessageAtStart()); - - class SendMessageAtStart : FeatureStartupTask - { - protected override Task OnStart(IMessageSession session, CancellationToken cancellationToken = default) => session.SendLocal(new MyMessage(), cancellationToken); - - protected override Task OnStop(IMessageSession session, CancellationToken cancellationToken = default) => Task.CompletedTask; - } + protected override Task OnStop(IMessageSession session, CancellationToken cancellationToken = default) => Task.CompletedTask; } public class MyMessageHandler(Context scenarioContext, IReadOnlySettings settings) diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_message_has_failed.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_message_has_failed.cs index f2c48dc74b..5770977ac6 100644 --- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_message_has_failed.cs +++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_message_has_failed.cs @@ -285,14 +285,14 @@ public class EndpointThatUsesSignalR : EndpointConfigurationBuilder public EndpointThatUsesSignalR() => EndpointSetup(c => { + c.EnableFeature(); + var routing = c.ConfigureRouting(); routing.RouteToEndpoint(typeof(MyMessage), typeof(Receiver)); }); class SignalRStarterFeature : Feature { - public SignalRStarterFeature() => EnableByDefault(); - protected override void Setup(FeatureConfigurationContext context) { context.Services.AddSingleton(); diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_message_has_failed_from_send_only_endpoint.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_message_has_failed_from_send_only_endpoint.cs index 9daae5e6f9..a310abb4b7 100644 --- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_message_has_failed_from_send_only_endpoint.cs +++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_message_has_failed_from_send_only_endpoint.cs @@ -58,9 +58,9 @@ await Define(ctx => public class SendOnlyEndpoint : EndpointConfigurationBuilder { - public SendOnlyEndpoint() => EndpointSetup(); + public SendOnlyEndpoint() => EndpointSetup(c => c.EnableFeature()); - class Foo : DispatchRawMessages + class SendMessage : DispatchRawMessages { protected override TransportOperations CreateMessage(MyContext context) { diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_messages_fails_multiple_times.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_messages_fails_multiple_times.cs index b9f91894be..ffd9515517 100644 --- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_messages_fails_multiple_times.cs +++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_messages_fails_multiple_times.cs @@ -51,7 +51,7 @@ class TestContext : ScenarioContext class AnEndpoint : EndpointConfigurationBuilder { - public AnEndpoint() => EndpointSetup(); + public AnEndpoint() => EndpointSetup(c => c.EnableFeature()); class FailedMessagesSender : DispatchRawMessages { diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_retry_fails_to_be_sent.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_retry_fails_to_be_sent.cs index 3e4e4e89cd..7da1d4d7a3 100644 --- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_retry_fails_to_be_sent.cs +++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_retry_fails_to_be_sent.cs @@ -81,6 +81,7 @@ public class FailureEndpoint : EndpointConfigurationBuilder public FailureEndpoint() => EndpointSetup(c => { + c.EnableFeature(); c.NoRetries(); c.ReportSuccessfulRetriesToServiceControl(); }); diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_retry_for_a_empty_body_message_is_successful.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_retry_for_a_empty_body_message_is_successful.cs index d9f453cab1..2a232507ca 100644 --- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_retry_for_a_empty_body_message_is_successful.cs +++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_a_retry_for_a_empty_body_message_is_successful.cs @@ -71,6 +71,7 @@ public class FailureEndpoint : EndpointConfigurationBuilder public FailureEndpoint() => EndpointSetup(c => { + c.EnableFeature(); c.NoDelayedRetries(); c.ReportSuccessfulRetriesToServiceControl(); c.Pipeline.Register(services => new LookForControlMessage(services.GetRequiredService()), "Look for control messages"); diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_an_event_with_multiple_subscribers_fails.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_an_event_with_multiple_subscribers_fails.cs index 835b8defeb..0dcf0dbd37 100644 --- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_an_event_with_multiple_subscribers_fails.cs +++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_an_event_with_multiple_subscribers_fails.cs @@ -43,7 +43,7 @@ await Define() public class FakeFailedSubscribers : EndpointConfigurationBuilder { - public FakeFailedSubscribers() => EndpointSetup(); + public FakeFailedSubscribers() => EndpointSetup(c => c.EnableFeature()); class SendDuplicateMessages : DispatchRawMessages { diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_errors_with_same_uniqueid_are_imported.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_errors_with_same_uniqueid_are_imported.cs index 7da463830a..e777f23e93 100644 --- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_errors_with_same_uniqueid_are_imported.cs +++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_errors_with_same_uniqueid_are_imported.cs @@ -86,7 +86,7 @@ public void Enrich(ErrorEnricherContext context) public class SourceEndpoint : EndpointConfigurationBuilder { - public SourceEndpoint() => EndpointSetup(); + public SourceEndpoint() => EndpointSetup(c => c.EnableFeature()); class SendMultipleFailedMessagesWithSameUniqueId : DispatchRawMessages { diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_ingesting_failed_message_with_missing_headers.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_ingesting_failed_message_with_missing_headers.cs index d79b88333c..f0d933885c 100644 --- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_ingesting_failed_message_with_missing_headers.cs +++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_ingesting_failed_message_with_missing_headers.cs @@ -117,7 +117,7 @@ public void AddMinimalRequiredHeaders() class FailingEndpoint : EndpointConfigurationBuilder { - public FailingEndpoint() => EndpointSetup(); + public FailingEndpoint() => EndpointSetup(c => c.EnableFeature()); class SendFailedMessage : DispatchRawMessages { diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/When_a_message_is_retried.cs b/src/ServiceControl.AcceptanceTests/Recoverability/When_a_message_is_retried.cs index f16197bae2..12060bad9c 100644 --- a/src/ServiceControl.AcceptanceTests/Recoverability/When_a_message_is_retried.cs +++ b/src/ServiceControl.AcceptanceTests/Recoverability/When_a_message_is_retried.cs @@ -106,7 +106,12 @@ class VerifyHeader : EndpointConfigurationBuilder { public VerifyHeader() => EndpointSetup( - (c, r) => c.Pipeline.Register(new CaptureIncomingMessage((TestContext)r.ScenarioContext), "Captures the incoming message")); + (c, r) => + { + c.EnableFeature(); + c.Pipeline.Register(new CaptureIncomingMessage((TestContext)r.ScenarioContext), + "Captures the incoming message"); + }); class FakeSender : DispatchRawMessages { diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/When_a_message_is_retried_with_a_replyTo_header.cs b/src/ServiceControl.AcceptanceTests/Recoverability/When_a_message_is_retried_with_a_replyTo_header.cs index b0eae45e18..cd054953a6 100644 --- a/src/ServiceControl.AcceptanceTests/Recoverability/When_a_message_is_retried_with_a_replyTo_header.cs +++ b/src/ServiceControl.AcceptanceTests/Recoverability/When_a_message_is_retried_with_a_replyTo_header.cs @@ -53,8 +53,11 @@ class VerifyHeader : EndpointConfigurationBuilder { public VerifyHeader() => EndpointSetup( - (c, r) => c.RegisterMessageMutator(new VerifyHeaderIsUnchanged((ReplyToContext)r.ScenarioContext)) - ); + (c, r) => + { + c.EnableFeature(); + c.RegisterMessageMutator(new VerifyHeaderIsUnchanged((ReplyToContext)r.ScenarioContext)); + }); class FakeSender : DispatchRawMessages { diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/When_a_native_integration_message_is_retried.cs b/src/ServiceControl.AcceptanceTests/Recoverability/When_a_native_integration_message_is_retried.cs index 6f55224368..c3cfea7d08 100644 --- a/src/ServiceControl.AcceptanceTests/Recoverability/When_a_native_integration_message_is_retried.cs +++ b/src/ServiceControl.AcceptanceTests/Recoverability/When_a_native_integration_message_is_retried.cs @@ -52,8 +52,11 @@ class VerifyHeader : EndpointConfigurationBuilder { public VerifyHeader() => EndpointSetup( - (c, r) => c.RegisterMessageMutator(new VerifyHeaderIsUnchanged((TestContext)r.ScenarioContext)) - ); + (c, r) => + { + c.EnableFeature(); + c.RegisterMessageMutator(new VerifyHeaderIsUnchanged((TestContext)r.ScenarioContext)); + }); class FakeSender : DispatchRawMessages { diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/When_single_message_fails_in_batch.cs b/src/ServiceControl.AcceptanceTests/Recoverability/When_single_message_fails_in_batch.cs index 99ccbe4258..a89013e2d4 100644 --- a/src/ServiceControl.AcceptanceTests/Recoverability/When_single_message_fails_in_batch.cs +++ b/src/ServiceControl.AcceptanceTests/Recoverability/When_single_message_fails_in_batch.cs @@ -70,7 +70,7 @@ public void Enrich(ErrorEnricherContext context) class Sendonly : EndpointConfigurationBuilder { - public Sendonly() => EndpointSetup(); + public Sendonly() => EndpointSetup(c => c.EnableFeature()); class SendMessage : DispatchRawMessages { diff --git a/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_a_message_sent_with_missing_metadata.cs b/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_a_message_sent_with_missing_metadata.cs index c272b9f439..99fe2a3394 100644 --- a/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_a_message_sent_with_missing_metadata.cs +++ b/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_a_message_sent_with_missing_metadata.cs @@ -36,7 +36,7 @@ public async Task Should_not_be_cast_TimeSent_to_DateTimeMin() public class ThirdPartyEndpoint : EndpointConfigurationBuilder { - public ThirdPartyEndpoint() => EndpointSetup(); + public ThirdPartyEndpoint() => EndpointSetup(c => c.EnableFeature()); class SendMessage : DispatchRawMessages { @@ -47,7 +47,7 @@ protected override TransportOperations CreateMessage(MyContext context) {Headers.ProcessingEndpoint, Conventions.EndpointNamingConvention(typeof(ThirdPartyEndpoint))}, {Headers.MessageId, context.MessageId} }; - return new TransportOperations(new TransportOperation(new OutgoingMessage(context.MessageId, headers, new byte[0]), new UnicastAddressTag("audit"))); + return new TransportOperations(new TransportOperation(new OutgoingMessage(context.MessageId, headers, Array.Empty()), new UnicastAddressTag("audit"))); } } } diff --git a/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_message_processed_successfully_from_sendonly.cs b/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_message_processed_successfully_from_sendonly.cs index 3469a8d964..22a0b3d463 100644 --- a/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_message_processed_successfully_from_sendonly.cs +++ b/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_message_processed_successfully_from_sendonly.cs @@ -34,7 +34,7 @@ public async Task Should_import_messages_from_sendonly_endpoint() class Sendonly : EndpointConfigurationBuilder { - public Sendonly() => EndpointSetup(); + public Sendonly() => EndpointSetup(c => c.EnableFeature()); class SendMessage : DispatchRawMessages { @@ -45,7 +45,7 @@ protected override TransportOperations CreateMessage(MyContext context) [Headers.MessageId] = context.MessageId, [Headers.ProcessingEndpoint] = Conventions.EndpointNamingConvention(typeof(Sendonly)) }; - return new TransportOperations(new TransportOperation(new OutgoingMessage(context.MessageId, headers, new byte[0]), new UnicastAddressTag("audit"))); + return new TransportOperations(new TransportOperation(new OutgoingMessage(context.MessageId, headers, Array.Empty()), new UnicastAddressTag("audit"))); } } } diff --git a/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_messages_are_marked_as_system_messages.cs b/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_messages_are_marked_as_system_messages.cs index 8c42e77c67..797da4c66c 100644 --- a/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_messages_are_marked_as_system_messages.cs +++ b/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_messages_are_marked_as_system_messages.cs @@ -126,7 +126,7 @@ await Define(ctx => class SystemMessageEndpoint : EndpointConfigurationBuilder { - public SystemMessageEndpoint() => EndpointSetup(); + public SystemMessageEndpoint() => EndpointSetup(c => c.EnableFeature()); public class SendMessageLowLevel : DispatchRawMessages { @@ -152,13 +152,11 @@ protected override TransportOperations CreateMessage(SystemMessageTestContext co headers[Headers.ControlMessageHeader] = context.ControlMessageHeaderValue != null && (bool)context.ControlMessageHeaderValue ? context.ControlMessageHeaderValue.ToString() : null; } - return new TransportOperations(new TransportOperation(new OutgoingMessage(context.MessageId, headers, new byte[0]), new UnicastAddressTag("audit"))); + return new TransportOperations(new TransportOperation(new OutgoingMessage(context.MessageId, headers, Array.Empty()), new UnicastAddressTag("audit"))); } protected override Task AfterDispatch(IMessageSession session, SystemMessageTestContext context) - { - return session.SendLocal(new DoQueryAllowed()); - } + => session.SendLocal(new DoQueryAllowed()); } class MyHandler(SystemMessageTestContext testContext) : IHandleMessages diff --git a/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_single_message_fails_in_batch.cs b/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_single_message_fails_in_batch.cs index c5c2385215..4b88b9e581 100644 --- a/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_single_message_fails_in_batch.cs +++ b/src/ServiceControl.Audit.AcceptanceTests/Auditing/When_single_message_fails_in_batch.cs @@ -70,7 +70,7 @@ public void Enrich(AuditEnricherContext context) class Sendonly : EndpointConfigurationBuilder { - public Sendonly() => EndpointSetup(); + public Sendonly() => EndpointSetup(c => c.EnableFeature()); class SendMessage : DispatchRawMessages { diff --git a/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_emitted_by_a_saga_is_audited.cs b/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_emitted_by_a_saga_is_audited.cs index 0f073fb8fd..5ff374bbae 100644 --- a/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_emitted_by_a_saga_is_audited.cs +++ b/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_emitted_by_a_saga_is_audited.cs @@ -49,9 +49,7 @@ public Task Handle(MessageInitiatingSaga message, IMessageHandlerContext context } protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper) - { - mapper.ConfigureMapping(msg => msg.Id).ToSaga(saga => saga.MessageId); - } + => mapper.MapSaga(s => s.MessageId).ToMessage(m => m.Id); } public class MySagaData : ContainSagaData diff --git a/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_hitting_a_saga_is_audited.cs b/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_hitting_a_saga_is_audited.cs index 6cfe155c47..84cf35a221 100644 --- a/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_hitting_a_saga_is_audited.cs +++ b/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_hitting_a_saga_is_audited.cs @@ -71,7 +71,8 @@ public Task Handle(MessageInitiatingSaga message, IMessageHandlerContext context return Task.CompletedTask; } - protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper) => mapper.ConfigureMapping(msg => msg.Id).ToSaga(saga => saga.MessageId); + protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper) + => mapper.MapSaga(saga => saga.MessageId).ToMessage(msg => msg.Id); } public class MySagaData : ContainSagaData diff --git a/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_hitting_multiple_sagas_is_audited.cs b/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_hitting_multiple_sagas_is_audited.cs index 8de46c484f..b3f351ce45 100644 --- a/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_hitting_multiple_sagas_is_audited.cs +++ b/src/ServiceControl.Audit.AcceptanceTests/SagaAudit/When_a_message_hitting_multiple_sagas_is_audited.cs @@ -76,7 +76,8 @@ public Task Handle(MessageInitiatingSaga message, IMessageHandlerContext context return Task.CompletedTask; } - protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper) => mapper.ConfigureMapping(msg => msg.Id).ToSaga(saga => saga.MessageId); + protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper) + => mapper.MapSaga(saga => saga.MessageId).ToMessage(msg => msg.Id); public class MySagaData : ContainSagaData { @@ -97,7 +98,8 @@ public Task Handle(MessageInitiatingSaga message, IMessageHandlerContext context return Task.CompletedTask; } - protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper) => mapper.ConfigureMapping(msg => msg.Id).ToSaga(saga => saga.MessageId); + protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper) => + mapper.MapSaga(saga => saga.MessageId).ToMessage(msg => msg.Id); public class MySagaData : ContainSagaData { diff --git a/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_disconnected_count.cs b/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_disconnected_count.cs index 7b4d47be94..5cfea4caf4 100644 --- a/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_disconnected_count.cs +++ b/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_disconnected_count.cs @@ -3,10 +3,12 @@ using System; using System.Threading.Tasks; using AcceptanceTesting.EndpointTemplates; + using Microsoft.Extensions.DependencyInjection; using NServiceBus; using NServiceBus.AcceptanceTesting; using NUnit.Framework; using ServiceControl.AcceptanceTesting; + using Conventions = NServiceBus.AcceptanceTesting.Customization.Conventions; class When_querying_disconnected_count : AcceptanceTest { @@ -22,21 +24,16 @@ public async Task Should_report_via_http() await Define(ctx => context = ctx) .WithEndpoint(b => - b.CustomConfig(endpointConfig => endpointConfig.EnableMetrics().SendMetricDataToServiceControl(Settings.DEFAULT_INSTANCE_NAME, TimeSpan.FromMilliseconds(200), "First")) - .ToCreateInstance(endpointConfig => Endpoint.Create(endpointConfig), async (startableEndpoint, cancellationToken) => - { - context.FirstInstance = await startableEndpoint.Start(cancellationToken); - - return context.FirstInstance; - })) + b.CustomConfig(c => c.EnableMetrics().SendMetricDataToServiceControl(Settings.DEFAULT_INSTANCE_NAME, TimeSpan.FromMilliseconds(200), "First"))) .WithEndpoint(b => - b.CustomConfig(endpointConfig => endpointConfig.EnableMetrics().SendMetricDataToServiceControl(Settings.DEFAULT_INSTANCE_NAME, TimeSpan.FromMilliseconds(200), "Second")) - .ToCreateInstance(endpointConfig => Endpoint.Create(endpointConfig), async (startableEndpoint, cancellationToken) => + b.CustomConfig(c => c.EnableMetrics().SendMetricDataToServiceControl(Settings.DEFAULT_INSTANCE_NAME, TimeSpan.FromMilliseconds(200), "Second"))) + .WithServiceResolve((provider, _) => { - context.SecondInstance = await startableEndpoint.Start(cancellationToken); - - return context.SecondInstance; - })) + var endpointName = Conventions.EndpointNamingConvention(typeof(MonitoredEndpoint)); + context.FirstInstance = provider.GetRequiredKeyedService($"{endpointName}0"); + context.SecondInstance = provider.GetRequiredKeyedService($"{endpointName}0"); + return Task.CompletedTask; + }) .Done(async c => { if (!c.WaitedInitial2Seconds) diff --git a/src/ServiceControl.MultiInstance.AcceptanceTests/SagaAudit/When_sending_saga_audit_to_audit_instance.cs b/src/ServiceControl.MultiInstance.AcceptanceTests/SagaAudit/When_sending_saga_audit_to_audit_instance.cs index 4e6773ab61..3904d90e99 100644 --- a/src/ServiceControl.MultiInstance.AcceptanceTests/SagaAudit/When_sending_saga_audit_to_audit_instance.cs +++ b/src/ServiceControl.MultiInstance.AcceptanceTests/SagaAudit/When_sending_saga_audit_to_audit_instance.cs @@ -90,9 +90,7 @@ public Task Handle(MessageInitiatingSaga message, IMessageHandlerContext context } protected override void ConfigureHowToFindSaga(SagaPropertyMapper mapper) - { - mapper.ConfigureMapping(msg => msg.Id).ToSaga(saga => saga.MessageId); - } + => mapper.MapSaga(saga => saga.MessageId).ToMessage(msg => msg.Id); } public class MySagaData : ContainSagaData From c19fe05efc6b080fa7efbb50983a55f8bef64f1b Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 5 Dec 2025 17:47:27 +0100 Subject: [PATCH 21/27] Upgrade non durable to latest --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 1ed9ff1c02..a4acbd77ce 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -41,7 +41,7 @@ - + From 62f85a8275e699f4ee2622b0f9653bf5504c97f7 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 5 Dec 2025 17:53:59 +0100 Subject: [PATCH 22/27] Acceptance test infrastructure changes --- src/ServiceControl.AcceptanceTesting/DispatchRawMessages.cs | 1 - .../EndpointConfigurationExtensions.cs | 1 - .../ExternalIntegration/ExternalIntegrationAcceptanceTest.cs | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ServiceControl.AcceptanceTesting/DispatchRawMessages.cs b/src/ServiceControl.AcceptanceTesting/DispatchRawMessages.cs index 0a5e8a5198..28e6d4f13d 100644 --- a/src/ServiceControl.AcceptanceTesting/DispatchRawMessages.cs +++ b/src/ServiceControl.AcceptanceTesting/DispatchRawMessages.cs @@ -14,7 +14,6 @@ public abstract class DispatchRawMessages : Feature { protected DispatchRawMessages() { - EnableByDefault(); } protected override void Setup(FeatureConfigurationContext context) diff --git a/src/ServiceControl.AcceptanceTesting/EndpointConfigurationExtensions.cs b/src/ServiceControl.AcceptanceTesting/EndpointConfigurationExtensions.cs index 1ee7563f17..bc7935a031 100644 --- a/src/ServiceControl.AcceptanceTesting/EndpointConfigurationExtensions.cs +++ b/src/ServiceControl.AcceptanceTesting/EndpointConfigurationExtensions.cs @@ -31,7 +31,6 @@ public static void ScanTypesForTest(this EndpointConfiguration config, .SelectMany(a => a.GetTypes()) .Union(GetNestedTypeRecursive(customizationConfiguration.BuilderType.DeclaringType, customizationConfiguration.BuilderType)) .Union(customizationConfiguration.TypesToInclude) - .Except(customizationConfiguration.TypesToExclude) .ToList()); return; diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/ExternalIntegration/ExternalIntegrationAcceptanceTest.cs b/src/ServiceControl.AcceptanceTests/Recoverability/ExternalIntegration/ExternalIntegrationAcceptanceTest.cs index bec6039d65..d717d22c7f 100644 --- a/src/ServiceControl.AcceptanceTests/Recoverability/ExternalIntegration/ExternalIntegrationAcceptanceTest.cs +++ b/src/ServiceControl.AcceptanceTests/Recoverability/ExternalIntegration/ExternalIntegrationAcceptanceTest.cs @@ -19,6 +19,7 @@ public class ErrorSender : EndpointConfigurationBuilder public ErrorSender() => EndpointSetup(c => { + c.EnableFeature(); c.NoDelayedRetries(); c.ReportSuccessfulRetriesToServiceControl(); }); From c66412a9e1015a8515b0652bf2b20098c1a519b5 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 5 Dec 2025 17:54:17 +0100 Subject: [PATCH 23/27] Register features --- .../Infrastructure/NServiceBusFactory.cs | 3 +++ .../Plugins/RegisterPluginMessages.cs | 13 +++---------- .../ExternalIntegrationsFeature.cs | 10 +--------- .../Infrastructure/NServiceBusFactory.cs | 7 +++++-- .../Plugins/RegisterPluginMessages.cs | 13 +++---------- 5 files changed, 15 insertions(+), 31 deletions(-) diff --git a/src/ServiceControl.Audit/Infrastructure/NServiceBusFactory.cs b/src/ServiceControl.Audit/Infrastructure/NServiceBusFactory.cs index 0f45556f40..cf7ea880fb 100644 --- a/src/ServiceControl.Audit/Infrastructure/NServiceBusFactory.cs +++ b/src/ServiceControl.Audit/Infrastructure/NServiceBusFactory.cs @@ -7,6 +7,7 @@ namespace ServiceControl.Audit.Infrastructure using Contracts.MessageFailures; using NServiceBus; using NServiceBus.Configuration.AdvancedExtensibility; + using Plugins; using ServiceControl.Configuration; using ServiceControl.Infrastructure; using Transports; @@ -25,6 +26,8 @@ public static void Configure(Settings.Settings settings, ITransportCustomization assemblyScanner.ExcludeAssemblies("ServiceControl.Plugin"); } + configuration.EnableFeature(); + configuration.Pipeline.Register(typeof(FullTypeNameOnlyBehavior), "Remove asm qualified name from the message type header"); configuration.GetSettings().Set("ServiceControl.Settings", settings); diff --git a/src/ServiceControl.Audit/Infrastructure/Plugins/RegisterPluginMessages.cs b/src/ServiceControl.Audit/Infrastructure/Plugins/RegisterPluginMessages.cs index 0de36f82b7..b6e271ca46 100644 --- a/src/ServiceControl.Audit/Infrastructure/Plugins/RegisterPluginMessages.cs +++ b/src/ServiceControl.Audit/Infrastructure/Plugins/RegisterPluginMessages.cs @@ -5,20 +5,13 @@ class RegisterPluginMessagesFeature : Feature { - public RegisterPluginMessagesFeature() - { - EnableByDefault(); - } - /// /// Invoked if the feature is activated /// /// The feature context - protected override void Setup(FeatureConfigurationContext context) - { + protected override void Setup(FeatureConfigurationContext context) => context.Settings.Get().AddSystemMessagesConventions(t => t.Namespace != null - && t.Namespace.StartsWith("ServiceControl.Plugin.") - && t.Namespace.EndsWith(".Messages")); - } + && t.Namespace.StartsWith("ServiceControl.Plugin.") + && t.Namespace.EndsWith(".Messages")); } } \ No newline at end of file diff --git a/src/ServiceControl/ExternalIntegrations/ExternalIntegrationsFeature.cs b/src/ServiceControl/ExternalIntegrations/ExternalIntegrationsFeature.cs index 5fc842c980..bfd098a146 100644 --- a/src/ServiceControl/ExternalIntegrations/ExternalIntegrationsFeature.cs +++ b/src/ServiceControl/ExternalIntegrations/ExternalIntegrationsFeature.cs @@ -4,15 +4,7 @@ namespace ServiceControl.ExternalIntegrations class ExternalIntegrationsFeature : Feature { - public ExternalIntegrationsFeature() - { - EnableByDefault(); - } - protected override void Setup(FeatureConfigurationContext context) - { - context.Pipeline.Register(new RemoveVersionInformationBehavior(), - "Removes version information from ServiceControl.Contracts messages"); - } + => context.Pipeline.Register(new RemoveVersionInformationBehavior(), "Removes version information from ServiceControl.Contracts messages"); } } \ No newline at end of file diff --git a/src/ServiceControl/Infrastructure/NServiceBusFactory.cs b/src/ServiceControl/Infrastructure/NServiceBusFactory.cs index 72116beaae..8818076cff 100644 --- a/src/ServiceControl/Infrastructure/NServiceBusFactory.cs +++ b/src/ServiceControl/Infrastructure/NServiceBusFactory.cs @@ -9,6 +9,7 @@ namespace ServiceBus.Management.Infrastructure using ServiceControl.Configuration; using ServiceControl.ExternalIntegrations; using ServiceControl.Infrastructure; + using ServiceControl.Infrastructure.Plugins; using ServiceControl.Infrastructure.Subscriptions; using ServiceControl.Monitoring.HeartbeatMonitoring; using ServiceControl.Notifications.Email; @@ -28,6 +29,8 @@ public static void Configure(Settings.Settings settings, ITransportCustomization assemblyScanner.ExcludeAssemblies("ServiceControl.Plugin"); } + configuration.EnableFeature(); + configuration.GetSettings().Set("ServiceControl.Settings", settings); transportCustomization.CustomizePrimaryEndpoint(configuration, transportSettings); @@ -35,9 +38,9 @@ public static void Configure(Settings.Settings settings, ITransportCustomization configuration.GetSettings().Set(settings.LoggingSettings); configuration.SetDiagnosticsPath(settings.LoggingSettings.LogPath); - if (settings.DisableExternalIntegrationsPublishing) + if (!settings.DisableExternalIntegrationsPublishing) { - configuration.DisableFeature(); + configuration.EnableFeature(); } var recoverability = configuration.Recoverability(); diff --git a/src/ServiceControl/Infrastructure/Plugins/RegisterPluginMessages.cs b/src/ServiceControl/Infrastructure/Plugins/RegisterPluginMessages.cs index 11c11c5772..1fd3b29a43 100644 --- a/src/ServiceControl/Infrastructure/Plugins/RegisterPluginMessages.cs +++ b/src/ServiceControl/Infrastructure/Plugins/RegisterPluginMessages.cs @@ -5,20 +5,13 @@ class RegisterPluginMessagesFeature : Feature { - public RegisterPluginMessagesFeature() - { - EnableByDefault(); - } - /// /// Invoked if the feature is activated /// /// The feature context - protected override void Setup(FeatureConfigurationContext context) - { + protected override void Setup(FeatureConfigurationContext context) => context.Settings.Get().AddSystemMessagesConventions(t => t.Namespace != null - && t.Namespace.StartsWith("ServiceControl.Plugin.") - && t.Namespace.EndsWith(".Messages")); - } + && t.Namespace.StartsWith("ServiceControl.Plugin.") + && t.Namespace.EndsWith(".Messages")); } } \ No newline at end of file From 630dfd20b19f5579dfcc622b3c820c3c4a167115 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 5 Dec 2025 17:54:28 +0100 Subject: [PATCH 24/27] Adjust subscription persistence --- .../ServiceControlSubscriptionPersistence.cs | 10 +++--- .../Subscriptions/SubscriptionStorage.cs | 31 ++++--------------- 2 files changed, 10 insertions(+), 31 deletions(-) diff --git a/src/ServiceControl/Infrastructure/Subscriptions/ServiceControlSubscriptionPersistence.cs b/src/ServiceControl/Infrastructure/Subscriptions/ServiceControlSubscriptionPersistence.cs index f7539ef7a0..7db47dbcc1 100644 --- a/src/ServiceControl/Infrastructure/Subscriptions/ServiceControlSubscriptionPersistence.cs +++ b/src/ServiceControl/Infrastructure/Subscriptions/ServiceControlSubscriptionPersistence.cs @@ -1,14 +1,12 @@ namespace ServiceControl.Infrastructure.Subscriptions { using NServiceBus; - using NServiceBus.Features; using NServiceBus.Persistence; - class ServiceControlSubscriptionPersistence : PersistenceDefinition + class ServiceControlSubscriptionPersistence : PersistenceDefinition, IPersistenceDefinitionFactory { - public ServiceControlSubscriptionPersistence() - { - Supports(s => s.EnableFeatureByDefault()); - } + ServiceControlSubscriptionPersistence() => Supports(); + + static ServiceControlSubscriptionPersistence IPersistenceDefinitionFactory.Create() => new(); } } \ No newline at end of file diff --git a/src/ServiceControl/Infrastructure/Subscriptions/SubscriptionStorage.cs b/src/ServiceControl/Infrastructure/Subscriptions/SubscriptionStorage.cs index dbce55d1e3..72117ba023 100644 --- a/src/ServiceControl/Infrastructure/Subscriptions/SubscriptionStorage.cs +++ b/src/ServiceControl/Infrastructure/Subscriptions/SubscriptionStorage.cs @@ -8,36 +8,17 @@ using NServiceBus.Transport; using ServiceControl.Persistence; - class SubscriptionStorage : Feature + sealed class SubscriptionStorage : Feature { - SubscriptionStorage() - { - Prerequisite(c => c.Settings.Get().SupportsPublishSubscribe == false, "The transport supports native pub sub"); - } + public SubscriptionStorage() => Prerequisite(c => c.Settings.Get().SupportsPublishSubscribe == false, "The transport supports native pub sub"); - protected override void Setup(FeatureConfigurationContext context) - { - context.RegisterStartupTask(b => new PrimeSubscriptions(b.GetRequiredService())); - } + protected override void Setup(FeatureConfigurationContext context) => context.RegisterStartupTask(b => new PrimeSubscriptions(b.GetRequiredService())); - class PrimeSubscriptions : FeatureStartupTask + class PrimeSubscriptions(IServiceControlSubscriptionStorage persister) : FeatureStartupTask { - public IServiceControlSubscriptionStorage persister; - - public PrimeSubscriptions(IServiceControlSubscriptionStorage persister) - { - this.persister = persister; - } - - protected override Task OnStart(IMessageSession session, CancellationToken cancellationToken = default) - { - return persister?.Initialize() ?? Task.CompletedTask; - } + protected override Task OnStart(IMessageSession session, CancellationToken cancellationToken = default) => persister?.Initialize() ?? Task.CompletedTask; - protected override Task OnStop(IMessageSession session, CancellationToken cancellationToken = default) - { - return Task.CompletedTask; - } + protected override Task OnStop(IMessageSession session, CancellationToken cancellationToken = default) => Task.CompletedTask; } } } \ No newline at end of file From 35a63ae395904f4d7cb399278b6ace121dd0b1ff Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 5 Dec 2025 17:54:48 +0100 Subject: [PATCH 25/27] Cleanup UpgradeAuditInstanceCommand --- .../Commands/UpgradeAuditInstanceCommand.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ServiceControl.Config/Commands/UpgradeAuditInstanceCommand.cs b/src/ServiceControl.Config/Commands/UpgradeAuditInstanceCommand.cs index 91146217fe..1c0d966a94 100644 --- a/src/ServiceControl.Config/Commands/UpgradeAuditInstanceCommand.cs +++ b/src/ServiceControl.Config/Commands/UpgradeAuditInstanceCommand.cs @@ -7,7 +7,6 @@ using Framework; using Framework.Commands; using Framework.Modules; - using ServiceControlInstaller.Engine.Configuration.ServiceControl; using ServiceControlInstaller.Engine.Instances; using ServiceControlInstaller.Engine.ReportCard; using UI.InstanceDetails; From 5f88df9ebd55c137ba36dad2d14d80759424a66f Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 5 Dec 2025 17:55:08 +0100 Subject: [PATCH 26/27] Actual endpoint but those things are probably not registered anyway --- .../When_querying_disconnected_count.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_disconnected_count.cs b/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_disconnected_count.cs index 5cfea4caf4..8c85c4bd15 100644 --- a/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_disconnected_count.cs +++ b/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_disconnected_count.cs @@ -30,8 +30,8 @@ await Define(ctx => context = ctx) .WithServiceResolve((provider, _) => { var endpointName = Conventions.EndpointNamingConvention(typeof(MonitoredEndpoint)); - context.FirstInstance = provider.GetRequiredKeyedService($"{endpointName}0"); - context.SecondInstance = provider.GetRequiredKeyedService($"{endpointName}0"); + context.FirstInstance = provider.GetRequiredKeyedService($"{endpointName}1"); + context.SecondInstance = provider.GetRequiredKeyedService($"{endpointName}2"); return Task.CompletedTask; }) .Done(async c => From ad1bea10b4399937f665ca65881db4bc8d465bd1 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Fri, 5 Dec 2025 18:02:18 +0100 Subject: [PATCH 27/27] Fix test by going back to manual creation --- .../When_querying_disconnected_count.cs | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_disconnected_count.cs b/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_disconnected_count.cs index 8c85c4bd15..52e60e9205 100644 --- a/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_disconnected_count.cs +++ b/src/ServiceControl.Monitoring.AcceptanceTests/When_querying_disconnected_count.cs @@ -3,12 +3,10 @@ using System; using System.Threading.Tasks; using AcceptanceTesting.EndpointTemplates; - using Microsoft.Extensions.DependencyInjection; using NServiceBus; using NServiceBus.AcceptanceTesting; using NUnit.Framework; using ServiceControl.AcceptanceTesting; - using Conventions = NServiceBus.AcceptanceTesting.Customization.Conventions; class When_querying_disconnected_count : AcceptanceTest { @@ -24,16 +22,19 @@ public async Task Should_report_via_http() await Define(ctx => context = ctx) .WithEndpoint(b => - b.CustomConfig(c => c.EnableMetrics().SendMetricDataToServiceControl(Settings.DEFAULT_INSTANCE_NAME, TimeSpan.FromMilliseconds(200), "First"))) + b.CustomConfig(c => c.EnableMetrics().SendMetricDataToServiceControl(Settings.DEFAULT_INSTANCE_NAME, TimeSpan.FromMilliseconds(200), "First")) + .ToCreateInstance((services, configuration) => EndpointWithExternallyManagedContainer.Create(configuration, services), async (startableEndpoint, provider, ct) => + { + context.FirstInstance = await startableEndpoint.Start(provider, ct); + return context.FirstInstance; + })) .WithEndpoint(b => - b.CustomConfig(c => c.EnableMetrics().SendMetricDataToServiceControl(Settings.DEFAULT_INSTANCE_NAME, TimeSpan.FromMilliseconds(200), "Second"))) - .WithServiceResolve((provider, _) => - { - var endpointName = Conventions.EndpointNamingConvention(typeof(MonitoredEndpoint)); - context.FirstInstance = provider.GetRequiredKeyedService($"{endpointName}1"); - context.SecondInstance = provider.GetRequiredKeyedService($"{endpointName}2"); - return Task.CompletedTask; - }) + b.CustomConfig(c => c.EnableMetrics().SendMetricDataToServiceControl(Settings.DEFAULT_INSTANCE_NAME, TimeSpan.FromMilliseconds(200), "Second")) + .ToCreateInstance((services, configuration) => EndpointWithExternallyManagedContainer.Create(configuration, services), async (startableEndpoint, provider, ct) => + { + context.SecondInstance = await startableEndpoint.Start(provider, ct); + return context.SecondInstance; + })) .Done(async c => { if (!c.WaitedInitial2Seconds)