Skip to content

Commit 2d75c52

Browse files
authored
Merge 4d91da9 into bff00ae
2 parents bff00ae + 4d91da9 commit 2d75c52

File tree

4 files changed

+32
-5
lines changed

4 files changed

+32
-5
lines changed

.github/config/muted_ya.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ ydb/tests/functional/tenants test_tenants.py.TestTenants.test_list_database_abov
151151
ydb/tests/functional/tenants test_tenants.py.TestTenants.test_list_database_above[enable_alter_database_create_hive_first--true]
152152
ydb/tests/functional/tenants test_tenants.py.TestTenants.test_stop_start[enable_alter_database_create_hive_first--false]
153153
ydb/tests/functional/tenants test_tenants.py.TestTenants.test_stop_start[enable_alter_database_create_hive_first--true]
154+
ydb/tests/olap/scenario/test_alter_tiering.py.TestAlterTiering.test[many_tables]
155+
ydb/tests/olap/scenario/test_insert.py.TestInsert.test[read_data_during_bulk_upsert]
154156
ydb/tests/postgres_integrations/go-libpq docker_wrapper_test.py.test_pg_generated[Test64BitErrorChecking]
155157
ydb/tests/postgres_integrations/go-libpq docker_wrapper_test.py.test_pg_generated[TestArrayValueBackend]
156158
ydb/tests/postgres_integrations/go-libpq docker_wrapper_test.py.test_pg_generated[TestBinaryByteSliceToInt]

ydb/tests/olap/lib/ya.make

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ PY3_LIBRARY()
1515
library/python/testing/yatest_common
1616
ydb/public/api/client/yc_public/iam
1717
ydb/tests/oss/ydb_sdk_import
18+
ydb/tests/library
1819
)
1920

2021
END()

ydb/tests/olap/lib/ydb_cluster.py

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
import os
55
import requests
66
from ydb.tests.olap.lib.utils import get_external_param
7+
from ydb.tests.library.harness.kikimr_runner import KiKiMR
8+
from ydb.tests.library.harness.kikimr_config import KikimrConfigGenerator
9+
710
import ydb
811
from copy import deepcopy
912
from time import sleep, time
@@ -48,11 +51,13 @@ def __init__(self, desc: dict):
4851
self.role = YdbCluster.Node.Role.UNKNOWN
4952
self.tablets = [YdbCluster.Node.Tablet(t) for t in desc.get('Tablets', [])]
5053

54+
_ydb_cluster = None
5155
_ydb_driver = None
5256
_results_driver = None
5357
_cluster_info = None
54-
ydb_endpoint = get_external_param('ydb-endpoint', 'grpc://ydb-olap-testing-vla-0002.search.yandex.net:2135')
55-
ydb_database = get_external_param('ydb-db', 'olap-testing/kikimr/testing/acceptance-2').lstrip('/')
58+
59+
ydb_endpoint = get_external_param('ydb-endpoint', "")
60+
ydb_database = get_external_param('ydb-db', "/Root").lstrip('/')
5661
ydb_mon_port = 8765
5762
tables_path = get_external_param('tables-path', 'olap_yatests')
5863
_monitoring_urls: list[YdbCluster.MonitoringUrl] = None
@@ -126,6 +131,13 @@ def get_cluster_info(cls):
126131
}
127132
return deepcopy(cls._cluster_info)
128133

134+
@staticmethod
135+
def _start_ydb_cluster():
136+
config = KikimrConfigGenerator(extra_feature_flags=[])
137+
cluster = KiKiMR(configurator=config)
138+
cluster.start()
139+
return cluster
140+
129141
@staticmethod
130142
def _create_ydb_driver(endpoint, database, oauth=None, iam_file=None):
131143
credentials = None
@@ -156,8 +168,15 @@ def _create_ydb_driver(endpoint, database, oauth=None, iam_file=None):
156168
@classmethod
157169
def get_ydb_driver(cls):
158170
if cls._ydb_driver is None:
171+
endpoint = cls.ydb_endpoint
172+
if not endpoint:
173+
if cls._ydb_cluster is not None:
174+
raise "Double temporary cluster initialization attempt"
175+
cls._ydb_cluster = cls._start_ydb_cluster()
176+
node = cls._ydb_cluster.nodes[1]
177+
endpoint = "%s:%d" % (node.host, node.port)
159178
cls._ydb_driver = cls._create_ydb_driver(
160-
cls.ydb_endpoint, cls.ydb_database, oauth=os.getenv('OLAP_YDB_OAUTH', None)
179+
endpoint, cls.ydb_database, oauth=os.getenv('OLAP_YDB_OAUTH', None)
161180
)
162181
return cls._ydb_driver
163182

ydb/tests/olap/scenario/ya.make

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
PY3TEST()
22

3-
TAG(ya:manual)
4-
53
PY_SRCS (
64
conftest.py
75
)
@@ -13,6 +11,11 @@ PY3TEST()
1311
test_insert.py
1412
)
1513

14+
ENV(YDB_DRIVER_BINARY="ydb/apps/ydbd/ydbd")
15+
DEPENDS(
16+
ydb/apps/ydbd
17+
)
18+
1619
PEERDIR(
1720
contrib/python/allure-pytest
1821
contrib/python/allure-python-commons
@@ -26,4 +29,6 @@ PY3TEST()
2629
library/python/testing/yatest_common
2730
)
2831

32+
SIZE(MEDIUM)
33+
2934
END()

0 commit comments

Comments
 (0)