Skip to content

Commit 2da21af

Browse files
author
Alexey Zorkaltsev
authored
Merge pull request #404 from ydb-platform/call-cancelled-bug
Fix: Repeated unstable error CANCELLED: Call canceled
2 parents 0755e35 + 0f9f94d commit 2da21af

23 files changed

+75
-10
lines changed

.env.dev.sample

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
YDB_ANONYMOUS_CREDENTIALS=1
2+
YDB_SSL_ROOT_CERTIFICATES_FILE=../slo-tests/playground/data/ydb_certs/ca.pem
3+
YDB_ENDPOINT=grpc://<localhost / fqdn / ip-address>:<2135 / 2136>
4+
YDB_LOG_LEVEL=debug

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
services:
2727
ydb:
28-
image: ghcr.io/ydb-platform/local-ydb:nightly
28+
image: ydbplatform/local-ydb:24.1
2929
ports:
3030
- 2135:2135
3131
- 2136:2136

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2+
.env
3+
14
#npm
25
npm-debug.log*
36
node_modules

package-lock.json

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"@types/uuid": "^8.3.4",
5656
"@yandex-cloud/nodejs-sdk": "^2.0.0",
5757
"cross-env": "^7.0.3",
58+
"dotenv": "^16.4.5",
5859
"husky": "^7.0.4",
5960
"npm-run-all": "^4.1.5",
6061
"rimraf": "^5.0.1",

src/__tests__/e2e/connection.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
import {initDriver, destroyDriver} from "../../utils/test";
22

3+
if (process.env.TEST_ENVIRONMENT === 'dev') require('dotenv').config();
4+
35
describe('Connection', () => {
46
it('Test GRPC connection', async () => {
5-
let driver = await initDriver({endpoint: 'grpc://localhost:2136'});
7+
let driver = await initDriver({endpoint: process.env.YDB_ENDPOINT || 'grpc://localhost:2136'});
68
await driver.tableClient.withSession(async (session) => {
79
await session.executeQuery('SELECT 1');
810
});
911
await destroyDriver(driver)
1012
});
1113

1214
it('Test GRPCS connection', async () => {
13-
let driver = await initDriver({endpoint: 'grpcs://localhost:2135'});
15+
let driver = await initDriver({endpoint: process.env.YDB_ENDPOINT || 'grpcs://localhost:2135'});
1416
await driver.tableClient.withSession(async (session) => {
1517
await session.executeQuery('SELECT 1');
1618
});

src/__tests__/e2e/query-service/method-execute.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ import {ctxSymbol} from "../../../query/symbols";
1111
import StatsMode = Ydb.Query.StatsMode;
1212
import ExecMode = Ydb.Query.ExecMode;
1313

14+
if (process.env.TEST_ENVIRONMENT === 'dev') require('dotenv').config();
15+
1416
const DATABASE = '/local';
15-
const ENDPOINT = 'grpc://localhost:2136';
17+
const ENDPOINT = process.env.YDB_ENDPOINT || 'grpc://localhost:2136';
1618
const TABLE_NAME = 'test_table_1'
1719

1820
describe('Query.execute()', () => {

src/__tests__/e2e/query-service/query-service-client.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ import fs from "fs";
66
import {AUTO_TX} from "../../../table";
77
import {QuerySession, IExecuteResult} from "../../../query";
88

9+
if (process.env.TEST_ENVIRONMENT === 'dev') require('dotenv').config();
10+
911
const DATABASE = '/local';
10-
const ENDPOINT = 'grpcs://localhost:2135';
12+
const ENDPOINT = process.env.YDB_ENDPOINT || 'grpc://localhost:2135';
1113

1214
describe('Query client', () => {
1315

src/__tests__/e2e/query-service/rows-conversion.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ import {getDefaultLogger} from "../../../logger/get-default-logger";
99
import {ctxSymbol} from "../../../query/symbols";
1010
import {Context} from "../../../context";
1111

12+
if (process.env.TEST_ENVIRONMENT === 'dev') require('dotenv').config();
13+
1214
const DATABASE = '/local';
13-
const ENDPOINT = 'grpcs://localhost:2136';
15+
const ENDPOINT = process.env.YDB_ENDPOINT || 'grpc://localhost:2136';
1416
const TABLE_NAME = 'test_table_3'
1517

1618
interface IRow {

src/__tests__/e2e/query-service/transactions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ import {getDefaultLogger} from "../../../logger/get-default-logger";
88
import {ctxSymbol} from "../../../query/symbols";
99
import {Context} from "../../../context";
1010

11+
if (process.env.TEST_ENVIRONMENT === 'dev') require('dotenv').config();
12+
1113
const DATABASE = '/local';
12-
const ENDPOINT = 'grpc://localhost:2136';
14+
const ENDPOINT = process.env.YDB_ENDPOINT || 'grpc://localhost:2136';
1315

1416
describe('Query service transactions', () => {
1517

0 commit comments

Comments
 (0)