Skip to content

Commit 3712773

Browse files
authored
Add function tests for tpcds and clickbench (#13461)
1 parent bbc4ec0 commit 3712773

File tree

9 files changed

+108
-38
lines changed

9 files changed

+108
-38
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import ydb.tests.olap.load.lib.tpcds as tpcds
2+
from ydb.tests.functional.tpc.lib.conftest import FunctionalTestBase
3+
4+
5+
class TestTpcdsS1(tpcds.TestTpcds1, FunctionalTestBase):
6+
iterations: int = 1
7+
8+
@classmethod
9+
def setup_class(cls) -> None:
10+
cls.setup_cluster()
11+
cls.run_cli(['workload', 'tpcds', '-p', 'olap_yatests/tpcds/s1', 'init', '--store=column'])
12+
cls.run_cli(['workload', 'tpcds', '-p', 'olap_yatests/tpcds/s1', 'import', 'generator', '--scale=1'])
13+
tpcds.TestTpcds1.setup_class()
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
PY3TEST()
2+
ENV(YDB_HARD_MEMORY_LIMIT_BYTES="107374182400")
3+
4+
TEST_SRCS(
5+
test_tpcds.py
6+
)
7+
8+
SIZE(LARGE)
9+
TAG(ya:fat)
10+
11+
12+
REQUIREMENTS(ram:16)
13+
14+
ENV(YDB_ENABLE_COLUMN_TABLES="true")
15+
ENV(YDB_DRIVER_BINARY="ydb/apps/ydbd/ydbd")
16+
ENV(NO_KUBER_LOGS="yes")
17+
18+
PEERDIR(
19+
ydb/tests/functional/tpc/lib
20+
)
21+
22+
DEPENDS(
23+
ydb/apps/ydb
24+
ydb/apps/ydbd
25+
)
26+
27+
FORK_TEST_FILES()
28+
29+
END()

ydb/tests/functional/tpc/lib/ya.make

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
PY3_LIBRARY()
2+
3+
PY_SRCS (
4+
conftest.py
5+
)
6+
7+
PEERDIR(
8+
ydb/tests/library
9+
ydb/tests/olap/load/lib
10+
)
11+
12+
END()
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import os
2+
import ydb.tests.olap.load.lib.clickbench as clickbench
3+
import yatest.common
4+
from ydb.tests.functional.tpc.lib.conftest import FunctionalTestBase
5+
6+
7+
class TestClickbench(clickbench.TestClickbench, FunctionalTestBase):
8+
iterations: int = 1
9+
10+
@classmethod
11+
def setup_class(cls) -> None:
12+
cls.setup_cluster()
13+
cls.run_cli(['workload', 'clickbench', '-p', 'olap_yatests/clickbench/hits', 'init', '--store=column'])
14+
cls.run_cli(['workload', 'clickbench', '-p', 'olap_yatests/clickbench/hits', 'import', 'files', '--input', yatest.common.source_path("ydb/tests/functional/clickbench/data/hits.csv")])
15+
os.environ['NO_VERIFY_DATA_CLICKBENCH'] = '1'
16+
clickbench.TestClickbench.setup_class()

ydb/tests/functional/tpc/test_tpch.py renamed to ydb/tests/functional/tpc/medium/test_tpch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import ydb.tests.olap.load.lib.tpch as tpch
2-
from conftest import FunctionalTestBase
2+
from ydb.tests.functional.tpc.lib.conftest import FunctionalTestBase
33

44

55
class TestTpchS1(tpch.TestTpch1, FunctionalTestBase):
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
PY3TEST()
2+
ENV(YDB_HARD_MEMORY_LIMIT_BYTES="107374182400")
3+
4+
TEST_SRCS(
5+
test_clickbench.py
6+
test_tpch.py
7+
)
8+
9+
SIZE(MEDIUM)
10+
11+
REQUIREMENTS(ram:16)
12+
13+
ENV(YDB_ENABLE_COLUMN_TABLES="true")
14+
ENV(YDB_DRIVER_BINARY="ydb/apps/ydbd/ydbd")
15+
ENV(NO_KUBER_LOGS="yes")
16+
17+
PEERDIR(
18+
ydb/tests/functional/tpc/lib
19+
)
20+
21+
DEPENDS(
22+
ydb/apps/ydb
23+
ydb/apps/ydbd
24+
)
25+
26+
DATA(
27+
arcadia/ydb/tests/functional/clickbench/data/hits.csv
28+
)
29+
30+
FORK_TEST_FILES()
31+
32+
END()

ydb/tests/functional/tpc/ya.make

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,5 @@
1-
IF (NOT SANITIZER_TYPE)
2-
3-
PY3TEST()
4-
ENV(YDB_HARD_MEMORY_LIMIT_BYTES="107374182400")
5-
6-
PY_SRCS(
7-
conftest.py
1+
RECURSE(
2+
large
3+
lib
4+
medium
85
)
9-
10-
TEST_SRCS(
11-
test_tpch.py
12-
)
13-
14-
SIZE(MEDIUM)
15-
16-
REQUIREMENTS(ram:16)
17-
18-
ENV(YDB_ENABLE_COLUMN_TABLES="true")
19-
ENV(YDB_DRIVER_BINARY="ydb/apps/ydbd/ydbd")
20-
ENV(NO_KUBER_LOGS="yes")
21-
22-
PEERDIR(
23-
ydb/tests/library
24-
ydb/tests/olap/load/lib
25-
)
26-
27-
DEPENDS(
28-
ydb/apps/ydb
29-
ydb/apps/ydbd
30-
)
31-
32-
FORK_TEST_FILES()
33-
34-
END()
35-
36-
ENDIF()

ydb/tests/olap/lib/ydb_cli.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ def get_cli_command() -> list[str]:
3434
if cli == 'git':
3535
return [yatest.common.work_path('ydb')] + args
3636
elif cli == 'main':
37-
path = os.path.join(yatest.common.context.project_path, '../../../apps/ydb/ydb')
38-
return [yatest.common.binary_path(path)] + args
37+
return [yatest.common.binary_path('ydb/apps/ydb/ydb')] + args
3938
else:
4039
return [cli] + args
4140

0 commit comments

Comments
 (0)