diff --git a/modules/openiddict/test/Volo.Abp.OpenIddict.MongoDB.Tests/Volo/Abp/OpenIddict/MongoDB/OpenIddictMongoDbTestModule.cs b/modules/openiddict/test/Volo.Abp.OpenIddict.MongoDB.Tests/Volo/Abp/OpenIddict/MongoDB/OpenIddictMongoDbTestModule.cs index 700d96fd47..6282aed3a0 100644 --- a/modules/openiddict/test/Volo.Abp.OpenIddict.MongoDB.Tests/Volo/Abp/OpenIddict/MongoDB/OpenIddictMongoDbTestModule.cs +++ b/modules/openiddict/test/Volo.Abp.OpenIddict.MongoDB.Tests/Volo/Abp/OpenIddict/MongoDB/OpenIddictMongoDbTestModule.cs @@ -17,12 +17,13 @@ namespace Volo.Abp.OpenIddict.MongoDB; public class OpenIddictMongoDbTestModule : AbpModule { private static string _connectionString; - + public override void ConfigureServices(ServiceConfigurationContext context) { + _connectionString = MongoDbFixture.GetRandomConnectionString(); Configure(options => { - options.ConnectionStrings.Default = MongoDbFixture.GetRandomConnectionString(); + options.ConnectionStrings.Default = _connectionString; }); }