Skip to content

Commit 6392c29

Browse files
dev: prepare repository for benchmarks testing
1 parent cc32b10 commit 6392c29

File tree

66 files changed

+588
-1922
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+588
-1922
lines changed

.github/workflows/slo.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
read_rps: 1000
2929
write_rps: 1000
3030
- workload: EF
31-
read_rps: 400
32-
write_rps: 400
31+
read_rps: 500
32+
write_rps: 500
3333

3434
concurrency:
3535
group: slo-${{ github.ref }}-${{ matrix.workload }}

.github/workflows/tests.yml

Lines changed: 27 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,18 @@ on:
1010
- cron: "45 * * * *"
1111

1212
jobs:
13-
unit-tests:
13+
ydb-sdk-tests:
1414
strategy:
15-
fail-fast: false
1615
matrix:
1716
os: [ ubuntu-22.04, windows-2022, macos-15 ]
18-
dotnet-version: [ 6.0.x, 7.0.x ]
19-
include:
20-
- dotnet-version: 6.0.x
21-
dotnet-target-framework: net6.0
22-
- dotnet-version: 7.0.x
23-
dotnet-target-framework: net7.0
24-
runs-on: ${{ matrix.os }}
25-
steps:
26-
- name: Checkout
27-
uses: actions/checkout@v4
28-
- name: Setup dotnet
29-
uses: actions/setup-dotnet@v4
30-
with:
31-
dotnet-version: ${{ matrix.dotnet-version }}
32-
- name: Test
33-
run: dotnet test src/Ydb.Sdk/tests/Tests.csproj --filter "Category=Unit" -f ${{ matrix.dotnet-target-framework }}
34-
ado-net-tests:
35-
runs-on: ubuntu-22.04
36-
strategy:
37-
fail-fast: false
38-
matrix:
3917
ydb-version: [ 'latest', '25.1' ]
40-
dotnet-version: [ 6.0.x, 7.0.x ]
18+
dotnet-version: [ 8.0.x, 9.0.x ]
4119
include:
42-
- dotnet-version: 6.0.x
43-
dotnet-target-framework: net6.0
44-
- dotnet-version: 7.0.x
45-
dotnet-target-framework: net7.0
20+
- dotnet-version: 8.0.x
21+
dotnet-target-framework: net8.0
22+
- dotnet-version: 9.0.x
23+
dotnet-target-framework: net9.0
24+
runs-on: ${{ matrix.os }}
4625
services:
4726
ydb:
4827
image: ydbplatform/local-ydb:${{ matrix.ydb-version }}
@@ -60,42 +39,21 @@ jobs:
6039
uses: actions/setup-dotnet@v4
6140
with:
6241
dotnet-version: ${{ matrix.dotnet-version }}
63-
- name: Run ADO.NET tests
42+
- name: Run ADO.NET Tests
43+
working-directory: ./src/Ydb.Sdk/test/Ydb.Sdk.Ado.Tests
6444
run: |
6545
docker cp ydb-local:/ydb_certs/ca.pem ~/
66-
dotnet test src/Ydb.Sdk/tests/Tests.csproj --filter "(FullyQualifiedName~Ado) | (FullyQualifiedName~Dapper)" -f ${{ matrix.dotnet-target-framework }} -l "console;verbosity=normal"
67-
topic-tests:
68-
runs-on: ubuntu-22.04
69-
strategy:
70-
fail-fast: false
71-
matrix:
72-
ydb-version: [ 'trunk' ]
73-
dotnet-version: [ 6.0.x, 7.0.x ]
74-
include:
75-
- dotnet-version: 6.0.x
76-
dotnet-target-framework: net6.0
77-
- dotnet-version: 7.0.x
78-
dotnet-target-framework: net7.0
79-
services:
80-
ydb:
81-
image: ydbplatform/local-ydb:${{ matrix.ydb-version }}
82-
ports:
83-
- 2135:2135
84-
- 2136:2136
85-
- 8765:8765
86-
env:
87-
YDB_LOCAL_SURVIVE_RESTART: true
88-
options: '--name ydb-local -h localhost'
89-
steps:
90-
- name: Checkout code
91-
uses: actions/checkout@v4
92-
- name: Install Dotnet
93-
uses: actions/setup-dotnet@v4
94-
with:
95-
dotnet-version: ${{ matrix.dotnet-version }}
96-
- name: Run Topic tests
97-
run: dotnet test src/Ydb.Sdk/tests/Tests.csproj --filter "FullyQualifiedName~Topic" -f ${{ matrix.dotnet-target-framework }} -l "console;verbosity=detailed"
98-
efcore-functional-tests:
46+
dotnet test -f ${{ matrix.dotnet-target-framework }}
47+
- name: Run ADO.NET Specification Tests
48+
working-directory: ./src/Ydb.Sdk/test/Ydb.Sdk.Ado.Specification.Tests
49+
run: dotnet test -f ${{ matrix.dotnet-target-framework }}
50+
- name: Run ADO.NET Dapper Tests
51+
working-directory: ./src/Ydb.Sdk/test/Ydb.Sdk.Ado.Dapper.Tests
52+
run: dotnet test -f ${{ matrix.dotnet-target-framework }}
53+
- name: Run Topic Tests
54+
working-directory: ./src/Ydb.Sdk/test/Ydb.Sdk.Topic.Tests
55+
run: dotnet test -f ${{ matrix.dotnet-target-framework }}
56+
efcore-tests:
9957
runs-on: ubuntu-22.04
10058
strategy:
10159
fail-fast: false
@@ -119,51 +77,20 @@ jobs:
11977
with:
12078
dotnet-version: 9.0.x
12179
- name: Run EFCore tests
122-
run: dotnet test src/EFCore.Ydb/test/EntityFrameworkCore.Ydb.FunctionalTests/EntityFrameworkCore.Ydb.FunctionalTests.csproj -l "console;verbosity=detailed"
123-
integration-tests:
124-
runs-on: ubuntu-22.04
125-
strategy:
126-
fail-fast: false
127-
matrix:
128-
ydb-version: [ 'trunk' ]
129-
dotnet-version: [ 6.0.x, 7.0.x ]
130-
include:
131-
- dotnet-version: 6.0.x
132-
dotnet-target-framework: net6.0
133-
- dotnet-version: 7.0.x
134-
dotnet-target-framework: net7.0
135-
services:
136-
ydb:
137-
image: ydbplatform/local-ydb:${{ matrix.ydb-version }}
138-
ports:
139-
- 2135:2135
140-
- 2136:2136
141-
- 8765:8765
142-
env:
143-
YDB_LOCAL_SURVIVE_RESTART: true
144-
options: '--name ydb-local -h localhost'
145-
steps:
146-
- name: Checkout code
147-
uses: actions/checkout@v4
148-
- name: Install Dotnet
149-
uses: actions/setup-dotnet@v4
150-
with:
151-
dotnet-version: ${{ matrix.dotnet-version }}
152-
- name: Integration test
153-
run: dotnet test src/Ydb.Sdk/tests/Tests.csproj --filter "Category=Integration" -f ${{ matrix.dotnet-target-framework }} -l "console;verbosity=normal"
154-
80+
working-directory: ./src/EFCore.Ydb/test/EntityFrameworkCore.Ydb.FunctionalTests/
81+
run: dotnet test
15582
run-examples:
15683
runs-on: ubuntu-22.04
15784
strategy:
15885
fail-fast: false
15986
matrix:
16087
ydb-version: [ 'latest', 'trunk' ]
161-
dotnet-version: [ 6.0.x, 7.0.x ]
88+
dotnet-version: [ 8.0.x, 9.0.x ]
16289
include:
163-
- dotnet-version: 6.0.x
164-
dotnet-target-framework: net6.0
165-
- dotnet-version: 7.0.x
166-
dotnet-target-framework: net7.0
90+
- dotnet-version: 8.0.x
91+
dotnet-target-framework: net8.0
92+
- dotnet-version: 9.0.x
93+
dotnet-target-framework: net9.0
16794
services:
16895
ydb:
16996
image: ydbplatform/local-ydb:${{ matrix.ydb-version }}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Runtime.CompilerServices;
22

33
[assembly: InternalsVisibleTo("EntityFrameworkCore.Ydb")]
4-
[assembly: InternalsVisibleTo("Ydb.Sdk.Tests")]
4+
[assembly: InternalsVisibleTo("Ydb.Sdk.Ado.Tests")]
5+
[assembly: InternalsVisibleTo("Ydb.Sdk.Topic.Tests")]

src/Ydb.Sdk/tests/Dapper/DapperIntegrationTests.cs renamed to src/Ydb.Sdk/test/Ydb.Sdk.Ado.Dapper.Tests/DapperIntegrationTests.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,15 @@
22
using System.Data;
33
using Dapper;
44
using Xunit;
5-
using Ydb.Sdk.Tests.Ado.Specification;
6-
using Ydb.Sdk.Tests.Fixture;
5+
using Ydb.Sdk.Ado.Tests;
6+
using Ydb.Sdk.Ado.Tests.Utils;
77

8-
namespace Ydb.Sdk.Tests.Dapper;
8+
namespace Ydb.Sdk.Ado.Dapper.Tests;
99

10-
public class DapperIntegrationTests : YdbAdoNetFixture
10+
public class DapperIntegrationTests : TestBase
1111
{
1212
private static readonly TemporaryTables<DapperIntegrationTests> Tables = new();
1313

14-
public DapperIntegrationTests(YdbFactoryFixture fixture) : base(fixture)
15-
{
16-
}
17-
1814
[Fact]
1915
public async Task DapperYqlTutorialTests()
2016
{
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net8.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<ProjectReference Include="../../src/Ydb.Sdk.csproj"/>
12+
<ProjectReference Include="../Ydb.Sdk.Ado.Tests/Ydb.Sdk.Ado.Tests.csproj"/>
13+
</ItemGroup>
14+
15+
<ItemGroup>
16+
<PackageReference Include="Dapper" Version="2.1.35"/>
17+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0-rc.1.23419.4"/>
18+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0"/>
19+
<PackageReference Include="xunit" Version="2.9.3"/>
20+
<PackageReference Include="xunit.runner.visualstudio" Version="2.9.3"/>
21+
</ItemGroup>
22+
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net8.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<ProjectReference Include="../../src/Ydb.Sdk.csproj"/>
12+
</ItemGroup>
13+
14+
<ItemGroup>
15+
<PackageReference Include="AdoNet.Specification.Tests" Version="2.0.0-beta.2"/>
16+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0"/>
17+
<PackageReference Include="xunit" Version="2.9.3"/>
18+
<PackageReference Include="xunit.runner.visualstudio" Version="2.9.3"/>
19+
</ItemGroup>
20+
</Project>

src/Ydb.Sdk/tests/Ado/Specification/YdbCommandTests.cs renamed to src/Ydb.Sdk/test/Ydb.Sdk.Ado.Specification.Tests/YdbCommandTests.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
using AdoNet.Specification.Tests;
22
using Xunit;
3-
using Ydb.Sdk.Ado;
43

5-
namespace Ydb.Sdk.Tests.Ado.Specification;
4+
namespace Ydb.Sdk.Ado.Specification.Tests;
65

7-
public class YdbCommandTests : CommandTestBase<YdbFactoryFixture>
6+
public class YdbCommandTests(YdbFactoryFixture fixture) : CommandTestBase<YdbFactoryFixture>(fixture)
87
{
9-
public YdbCommandTests(YdbFactoryFixture fixture) : base(fixture)
10-
{
11-
}
12-
138
public override void ExecuteScalar_returns_string_when_text()
149
{
1510
using var connection = CreateOpenConnection();
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
using AdoNet.Specification.Tests;
2+
3+
namespace Ydb.Sdk.Ado.Specification.Tests;
4+
5+
public class YdbConnectionStringBuilderTests(YdbFactoryFixture fixture)
6+
: ConnectionStringTestBase<YdbFactoryFixture>(fixture);

src/Ydb.Sdk/tests/Ado/Specification/YdbConnectionTests.cs renamed to src/Ydb.Sdk/test/Ydb.Sdk.Ado.Specification.Tests/YdbConnectionTests.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
using AdoNet.Specification.Tests;
22
using Xunit;
3-
using Ydb.Sdk.Ado;
43

5-
namespace Ydb.Sdk.Tests.Ado.Specification;
4+
namespace Ydb.Sdk.Ado.Specification.Tests;
65

7-
public class YdbConnectionTests : ConnectionTestBase<YdbFactoryFixture>
6+
public class YdbConnectionTests(YdbFactoryFixture fixture) : ConnectionTestBase<YdbFactoryFixture>(fixture)
87
{
9-
public YdbConnectionTests(YdbFactoryFixture fixture) : base(fixture)
10-
{
11-
}
12-
138
#pragma warning disable xUnit1004
149
[Fact(Skip = "IComponent legacy.")]
1510
#pragma warning restore xUnit1004

0 commit comments

Comments
 (0)