Skip to content

Commit 34b636b

Browse files
fix tests
1 parent 8da448d commit 34b636b

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
uses: actions/setup-dotnet@v4
2424
with:
2525
dotnet-version: |
26+
6.0.x
2627
7.0.x
2728
9.0.x
2829
- name: Test

src/Ydb.Sdk/tests/Query/QueryIntegrationTests.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ INNER JOIN {Tables.Series} AS sr
6464
public async Task ReadRows_UpsertDeleteSelectSingleRow_ReturnNewRow()
6565
{
6666
await _queryClient.Exec($@"
67+
DECLARE $series_id AS Uint64;
68+
DECLARE $season_id AS Uint64;
69+
DECLARE $episode_id AS Uint64;
70+
DECLARE $title AS Text;
71+
DECLARE $air_date AS Date;
72+
6773
UPSERT INTO {Tables.Episodes} (series_id, season_id, episode_id, title, air_date)
6874
VALUES ($series_id, $season_id, $episode_id, $title, $air_date)", new Dictionary<string, YdbValue>
6975
{
@@ -75,6 +81,10 @@ await _queryClient.Exec($@"
7581
});
7682

7783
var row = await _queryClient.ReadRow($@"
84+
DECLARE $series_id AS Uint64;
85+
DECLARE $season_id AS Uint64;
86+
DECLARE $episode_id AS Uint64;
87+
7888
SELECT title FROM {Tables.Episodes}
7989
WHERE series_id = $series_id AND season_id = $season_id AND episode_id = $episode_id;",
8090
new Dictionary<string, YdbValue>
@@ -101,6 +111,10 @@ public async Task DoTx_UpsertThenRollbackTransaction_ReturnOldRow()
101111
await _queryClient.DoTx(async queryTx =>
102112
{
103113
await queryTx.Exec($@"
114+
DECLARE $series_id AS Uint64;
115+
DECLARE $season_id AS Uint64;
116+
DECLARE $air_date AS Date;
117+
104118
UPSERT INTO {Tables.Seasons} (series_id, season_id, first_aired) VALUES
105119
($series_id, $season_id, $air_date);
106120
", new Dictionary<string, YdbValue>
@@ -127,6 +141,10 @@ public async Task DoTx_UpsertThenExceptionInTransaction_ReturnOldRow()
127141
await _queryClient.DoTx(async queryTx =>
128142
{
129143
await queryTx.Exec($@"
144+
DECLARE $series_id AS Uint64;
145+
DECLARE $season_id AS Uint64;
146+
DECLARE $air_date AS Date;
147+
130148
UPSERT INTO {Tables.Seasons} (series_id, season_id, first_aired) VALUES
131149
($series_id, $season_id, $air_date);
132150
", new Dictionary<string, YdbValue>
@@ -204,6 +222,7 @@ public async Task Stream_ReadingMore1000RowsFromChannel_ReturnChannelExecutePart
204222
for (uint i = 0; i < sizeSeasons; i++)
205223
{
206224
tasks[i] = _queryClient.Exec(
225+
$"DECLARE $season_id AS Uint64; DECLARE $title AS Text;" +
207226
$"INSERT INTO {Tables.Seasons} (series_id, season_id, title) VALUES (3, $season_id, $title)",
208227
new Dictionary<string, YdbValue>
209228
{

0 commit comments

Comments
 (0)