Skip to content

Commit

Permalink
Add tpcds function tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iddqdex committed Jan 16, 2025
1 parent 32f057a commit 2d3a467
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 39 deletions.
13 changes: 13 additions & 0 deletions ydb/tests/functional/tpc/large/test_tpcds.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import ydb.tests.olap.load.lib.tpcds as tpcds
from ydb.tests.functional.tpc.lib.conftest import FunctionalTestBase


class TestTpcdsS1(tpcds.TestTpcds1, FunctionalTestBase):
iterations: int = 1

@classmethod
def setup_class(cls) -> None:
cls.setup_cluster()
cls.run_cli(['workload', 'tpcds', '-p', 'olap_yatests/tpcds/s1', 'init', '--store=column'])
cls.run_cli(['workload', 'tpcds', '-p', 'olap_yatests/tpcds/s1', 'import', 'generator', '--scale=1'])
tpcds.TestTpcds1.setup_class()
33 changes: 33 additions & 0 deletions ydb/tests/functional/tpc/large/ya.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
IF (NOT SANITIZER_TYPE)

PY3TEST()
ENV(YDB_HARD_MEMORY_LIMIT_BYTES="107374182400")

TEST_SRCS(
test_tpcds.py
)

SIZE(LARGE)
TAG(ya:fat)


REQUIREMENTS(ram:16)

ENV(YDB_ENABLE_COLUMN_TABLES="true")
ENV(YDB_DRIVER_BINARY="ydb/apps/ydbd/ydbd")
ENV(NO_KUBER_LOGS="yes")

PEERDIR(
ydb/tests/functional/tpc/lib
)

DEPENDS(
ydb/apps/ydb
ydb/apps/ydbd
)

FORK_TEST_FILES()

END()

ENDIF()
File renamed without changes.
12 changes: 12 additions & 0 deletions ydb/tests/functional/tpc/lib/ya.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
PY3_LIBRARY()

PY_SRCS (
conftest.py
)

PEERDIR(
ydb/tests/library
ydb/tests/olap/load/lib
)

END()
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ydb.tests.olap.load.lib.tpch as tpch
from conftest import FunctionalTestBase
from ydb.tests.functional.tpc.lib.conftest import FunctionalTestBase


class TestTpchS1(tpch.TestTpch1, FunctionalTestBase):
Expand Down
31 changes: 31 additions & 0 deletions ydb/tests/functional/tpc/medium/ya.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
IF (NOT SANITIZER_TYPE)

PY3TEST()
ENV(YDB_HARD_MEMORY_LIMIT_BYTES="107374182400")

TEST_SRCS(
test_tpch.py
)

SIZE(MEDIUM)

REQUIREMENTS(ram:16)

ENV(YDB_ENABLE_COLUMN_TABLES="true")
ENV(YDB_DRIVER_BINARY="ydb/apps/ydbd/ydbd")
ENV(NO_KUBER_LOGS="yes")

PEERDIR(
ydb/tests/functional/tpc/lib
)

DEPENDS(
ydb/apps/ydb
ydb/apps/ydbd
)

FORK_TEST_FILES()

END()

ENDIF()
41 changes: 5 additions & 36 deletions ydb/tests/functional/tpc/ya.make
Original file line number Diff line number Diff line change
@@ -1,36 +1,5 @@
IF (NOT SANITIZER_TYPE)

PY3TEST()
ENV(YDB_HARD_MEMORY_LIMIT_BYTES="107374182400")

PY_SRCS(
conftest.py
)

TEST_SRCS(
test_tpch.py
)

SIZE(MEDIUM)

REQUIREMENTS(ram:16)

ENV(YDB_ENABLE_COLUMN_TABLES="true")
ENV(YDB_DRIVER_BINARY="ydb/apps/ydbd/ydbd")
ENV(NO_KUBER_LOGS="yes")

PEERDIR(
ydb/tests/library
ydb/tests/olap/load/lib
)

DEPENDS(
ydb/apps/ydb
ydb/apps/ydbd
)

FORK_TEST_FILES()

END()

ENDIF()
RECURSE(
large
lib
medium
)
3 changes: 1 addition & 2 deletions ydb/tests/olap/lib/ydb_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ def get_cli_command() -> list[str]:
if cli == 'git':
return [yatest.common.work_path('ydb')] + args
elif cli == 'main':
path = os.path.join(yatest.common.context.project_path, '../../../apps/ydb/ydb')
return [yatest.common.binary_path(path)] + args
return [yatest.common.binary_path('ydb/apps/ydb/ydb')] + args
else:
return [cli] + args

Expand Down

0 comments on commit 2d3a467

Please sign in to comment.