Skip to content

Commit b46a3cc

Browse files
authored
simple_queue workload in pytest (#12895)
1 parent 57f6f63 commit b46a3cc

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# -*- coding: utf-8 -*-
2+
import yatest
3+
4+
from ydb.tests.library.harness.kikimr_runner import KiKiMR
5+
from ydb.tests.library.harness.kikimr_config import KikimrConfigGenerator
6+
from ydb.tests.library.common.types import Erasure
7+
8+
9+
class TestYdbWorkload(object):
10+
@classmethod
11+
def setup_class(cls):
12+
cls.cluster = KiKiMR(KikimrConfigGenerator(erasure=Erasure.MIRROR_3_DC))
13+
cls.cluster.start()
14+
15+
@classmethod
16+
def teardown_class(cls):
17+
cls.cluster.stop()
18+
19+
def test(self):
20+
workload_path = yatest.common.build_path("ydb/tests/workloads/simple_queue/simple_queue")
21+
store = "row" # or "column"
22+
yatest.common.execute(
23+
[
24+
workload_path,
25+
"--endpoint", "grpc://localhost:%d" % self.cluster.nodes[1].grpc_port,
26+
"--database=/Root",
27+
"--duration", "60",
28+
"--mode", store,
29+
],
30+
wait=True
31+
)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
PY3TEST()
2+
ENV(YDB_DRIVER_BINARY="ydb/apps/ydbd/ydbd")
3+
4+
TEST_SRCS(
5+
test_workload.py
6+
)
7+
8+
IF (SANITIZER_TYPE)
9+
REQUIREMENTS(ram:32)
10+
ENDIF()
11+
12+
SIZE(MEDIUM)
13+
14+
DEPENDS(
15+
ydb/apps/ydbd
16+
ydb/apps/ydb
17+
ydb/tests/workloads/simple_queue
18+
)
19+
20+
PEERDIR(
21+
ydb/tests/library
22+
)
23+
24+
25+
END()

ydb/tests/workloads/simple_queue/ya.make

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ PEERDIR(
1111

1212
END()
1313

14+
RECURSE_FOR_TESTS(
15+
tests
16+
)
17+

0 commit comments

Comments
 (0)