From aa5067cb555b5a8d8818db21b7920a00ca2daa71 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Thu, 19 Dec 2024 11:03:40 +0700 Subject: [PATCH] keep `CurrentProjectService` scoped when running tests --- backend/FwLite/LcmCrdt.Tests/LcmCrdtTestsKernel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/FwLite/LcmCrdt.Tests/LcmCrdtTestsKernel.cs b/backend/FwLite/LcmCrdt.Tests/LcmCrdtTestsKernel.cs index ccce423b6..e0d4e4204 100644 --- a/backend/FwLite/LcmCrdt.Tests/LcmCrdtTestsKernel.cs +++ b/backend/FwLite/LcmCrdt.Tests/LcmCrdtTestsKernel.cs @@ -12,7 +12,7 @@ public static IServiceCollection AddTestLcmCrdtClient(this IServiceCollection se services.AddLcmCrdtClient(); if (project is not null) { - services.AddSingleton(provider => + services.AddScoped(provider => { var currentProjectService = ActivatorUtilities.CreateInstance(provider); currentProjectService.SetupProjectContextForNewDb(project);