diff --git a/Directory.Packages.props b/Directory.Packages.props
index d84109317..eafd04611 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -227,8 +227,8 @@
package floors the native SQLitePCLRaw.lib.e_sqlite3 at 2.1.12, so consumers inherit the
CVE-2025-6965-fixed native binary without needing the surgical pin below.
-->
-
-
+
+
diff --git a/tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/LocalDb/GracefulStopWithOpenSyncStreamTests.cs b/tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/LocalDb/GracefulStopWithOpenSyncStreamTests.cs
index d620b0658..3fe3b929a 100644
--- a/tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/LocalDb/GracefulStopWithOpenSyncStreamTests.cs
+++ b/tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/LocalDb/GracefulStopWithOpenSyncStreamTests.cs
@@ -12,7 +12,10 @@ using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Options;
using Shouldly;
using Xunit;
using ZB.MOM.WW.LocalDb;
@@ -168,6 +171,20 @@ public sealed class GracefulStopWithOpenSyncStreamTests
});
builder.Services.AddSingleton(db);
builder.Services.AddZbLocalDbReplication(ReplicationConfig(peerAddress: null));
+ if (!withFix)
+ {
+ // From LocalDb 0.3.8 the library itself ends open sync streams on ApplicationStopping
+ // (scadaproj#57), which would hide the #906 drain in this control. Re-register the
+ // service WITHOUT the host lifetime, i.e. the 0.3.7 behaviour, so the control still
+ // reproduces the bug the host-side fix guards against.
+ builder.Services.Replace(ServiceDescriptor.Singleton(sp => new LocalDbSyncService(
+ sp.GetRequiredService(),
+ sp.GetRequiredService>(),
+ sp.GetRequiredService(),
+ sp.GetService(),
+ sp.GetService(),
+ lifetime: null)));
+ }
builder.Services.AddAkka("otopcua906", (ab, _) => ab.AddHocon(
ConfigurationFactory.ParseString(