-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathregression.py
executable file
·69 lines (57 loc) · 1.85 KB
/
regression.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/env python3
import os
import sys
from testflows.core import *
append_path(sys.path, "..")
from helpers.cluster import create_cluster
from helpers.argparser import argparser, CaptureClusterArgs
from helpers.common import experimental_analyzer
xfails = {}
@TestModule
@ArgumentParser(argparser)
@XFails(xfails)
@Name("kafka")
@CaptureClusterArgs
def regression(
self,
cluster_args,
clickhouse_version,
stress=None,
with_analyzer=False,
):
"""Kafka regression."""
nodes = {
"clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3"),
"kafka": ("kafka1", "kafka2", "kafka3"),
}
self.context.clickhouse_version = clickhouse_version
if stress is not None:
self.context.stress = stress
with Given("docker-compose cluster"):
cluster = create_cluster(
**cluster_args,
nodes=nodes,
configs_dir=current_dir(),
)
self.context.cluster = cluster
with And("I enable or disable experimental analyzer if needed"):
for node in nodes["clickhouse"]:
experimental_analyzer(node=cluster.node(node), with_analyzer=with_analyzer)
Scenario(run=load("kafka.tests.distributed", "scenario"), flags=TE)
Scenario(run=load("kafka.tests.non_replicated", "scenario"), flags=TE)
Scenario(run=load("kafka.tests.non_replicated_4_consumers", "scenario"), flags=TE)
Scenario(
run=load("kafka.tests.non_replicated_target_table_not_writable", "scenario"),
flags=TE,
)
Scenario(
run=load("kafka.tests.non_replicated_clickhouse_restart", "scenario"),
flags=TE,
)
Scenario(
run=load("kafka.tests.non_replicated_4_consumers_restart", "scenario"),
flags=TE,
)
Scenario(run=load("kafka.tests.replicated_stop_and_restart", "scenario"), flags=TE)
if main():
regression()