Skip to content

Commit 23ef9c3

Browse files
committed
Fix ExportTests: register SqlServer dialect, use correct secret name, disable parallelism
1 parent c14f4b4 commit 23ef9c3

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Tests/AsmInit.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static async Task Init(TestContext _)
2525
await CompilationExtensions.Init(Paths.FileSystem, Helper.LogManager.Application, [("designer_extensions.py", File.ReadAllText("../../../../Diagram.Core/python/designer_extensions.py"))], default);
2626

2727
ConfigManager.RegisterService<IDatabaseProvider>(new AdoDatabaseProvider());
28-
DatabaseProviderRegistry.Register(DatabaseProviderRegistry.SqlServer, SqlClientFactory.Instance);
28+
SqlServerDialect.Register(SqlClientFactory.Instance);
2929

3030
Helper.FileSystem.ClearTemp();
3131
}

Tests/ExportTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using StockSharp.Algo.Export;
66

77
[TestClass]
8+
[DoNotParallelize]
89
public class ExportTests : BaseTestClass
910
{
1011
private static readonly TemplateTxtRegistry _txtReg = new();
@@ -48,7 +49,7 @@ async Task Do(string extension, Func<Stream, BaseExporter> create)
4849
var dbExporter = new DatabaseExporter(DatabaseRegistry.Provider, dataType, new DatabaseConnectionPair
4950
{
5051
Provider = DatabaseProviderRegistry.AllProviders.First(),
51-
ConnectionString = GetSecret("DB_CONNECTION_STRING"),
52+
ConnectionString = GetSecret("SQLSERVER_CONNECTION_STRING"),
5253
})
5354
{
5455
DropExisting = true,

Tests/Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<ItemGroup>
88
<PackageReference Include="Ecng.Excel.OpenXml" Version="$(EcngVer)" />
99
<PackageReference Include="Ecng.Data.Ado" Version="$(EcngVer)" />
10+
<PackageReference Include="Ecng.Data.SqlServer" Version="$(EcngVer)" />
1011
<PackageReference Include="Microsoft.Data.SqlClient" Version="$(MsSqlClientVer)" />
1112
</ItemGroup>
1213
<ItemGroup>

0 commit comments

Comments
 (0)