Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
da9cdfc2
C
ClickHouse
项目概览
2dot5
/
ClickHouse
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClickHouse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
da9cdfc2
编写于
7月 26, 2017
作者:
V
Vitaliy Lyudvichenko
提交者:
alexey-milovidov
7月 27, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix integration tests. [#CLICKHOUSE-3173]
上级
bf1949fc
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
19 addition
and
13 deletion
+19
-13
dbms/tests/integration/helpers/cluster.py
dbms/tests/integration/helpers/cluster.py
+2
-1
dbms/tests/integration/test_distributed_ddl/test.py
dbms/tests/integration/test_distributed_ddl/test.py
+8
-5
dbms/tests/integration/test_extreme_deduplication/configs/conf.d/merge_tree.xml
.../test_extreme_deduplication/configs/conf.d/merge_tree.xml
+2
-2
dbms/tests/integration/test_extreme_deduplication/test.py
dbms/tests/integration/test_extreme_deduplication/test.py
+7
-5
未找到文件。
dbms/tests/integration/helpers/cluster.py
浏览文件 @
da9cdfc2
...
...
@@ -84,7 +84,8 @@ class ClickHouseCluster:
if
self
.
is_up
:
return
if
destroy_dirs
:
if
destroy_dirs
and
p
.
exists
(
self
.
instances_dir
):
print
"Removing instances dir"
,
self
.
instances_dir
shutil
.
rmtree
(
self
.
instances_dir
)
for
instance
in
self
.
instances
.
values
():
...
...
dbms/tests/integration/test_distributed_ddl/test.py
浏览文件 @
da9cdfc2
...
...
@@ -28,17 +28,20 @@ def ddl_check_query(instance, query, num_hosts=None):
return
contents
cluster
=
ClickHouseCluster
(
__file__
)
TEST_REPLICATED_ALTERS
=
True
cluster
=
ClickHouseCluster
(
__file__
)
for
i
in
xrange
(
4
):
cluster
.
add_instance
(
'ch{}'
.
format
(
i
+
1
),
config_dir
=
"configs"
,
macroses
=
{
"layer"
:
0
,
"shard"
:
i
/
2
+
1
,
"replica"
:
i
%
2
+
1
},
with_zookeeper
=
True
)
@
pytest
.
fixture
(
scope
=
"module"
)
def
started_cluster
():
try
:
for
i
in
xrange
(
4
):
macroses
=
{
"layer"
:
0
,
"shard"
:
i
/
2
+
1
,
"replica"
:
i
%
2
+
1
}
cluster
.
add_instance
(
'ch{}'
.
format
(
i
+
1
),
config_dir
=
"configs"
,
macroses
=
macroses
,
with_zookeeper
=
True
)
cluster
.
start
()
# Initialize databases and service tables
...
...
dbms/tests/integration/test_extreme_deduplication/configs/conf.d/merge_tree.xml
浏览文件 @
da9cdfc2
<yandex>
<merge_tree>
<replicated_deduplication_window>
999999999
</replicated_deduplication_window>
<replicated_deduplication_window_seconds>
2
</replicated_deduplication_window_seconds>
<cleanup_delay_period>
2
</cleanup_delay_period>
<replicated_deduplication_window_seconds>
1
</replicated_deduplication_window_seconds>
<cleanup_delay_period>
1
</cleanup_delay_period>
</merge_tree>
</yandex>
dbms/tests/integration/test_extreme_deduplication/test.py
浏览文件 @
da9cdfc2
...
...
@@ -35,6 +35,7 @@ ENGINE = ReplicatedMergeTree('/clickhouse/tables/0/simple2', '{replica}', date,
yield
cluster
finally
:
pass
cluster
.
shutdown
()
...
...
@@ -42,21 +43,22 @@ def test_deduplication_window_in_seconds(started_cluster):
node
=
node1
node
.
query
(
"INSERT INTO simple2 VALUES (0, 0)"
)
time
.
sleep
(
1
)
node
.
query
(
"INSERT INTO simple2 VALUES (0, 0)"
)
# deduplication works here
node
.
query
(
"INSERT INTO simple2 VALUES (0, 1)"
)
node
.
query
(
"INSERT INTO simple2 VALUES (0, 1)"
)
# deduplication works here
assert
TSV
(
node
.
query
(
"SELECT count() FROM simple2"
))
==
TSV
(
"2
\n
"
)
# wait clean thread
time
.
sleep
(
2
)
node
.
query
(
"INSERT INTO simple2 VALUES (0, 1)"
)
# deduplication doesn't works here, hash node was deleted
assert
TSV
(
node
.
query
(
"SELECT count() FROM simple2"
))
==
TSV
(
"3
\n
"
)
assert
TSV
.
toMat
(
node
.
query
(
"SELECT count() FROM system.zookeeper WHERE path='/clickhouse/tables/0/simple2/blocks'"
))[
0
][
0
]
==
"1"
node
.
query
(
"INSERT INTO simple2 VALUES (0, 0)"
)
# deduplication doesn't works here, the first hash node was deleted
assert
TSV
.
toMat
(
node
.
query
(
"SELECT count() FROM simple2"
))[
0
][
0
]
==
"3"
def
check_timeout_exception
(
e
):
s
=
str
(
e
)
print
s
#
print s
assert
s
.
find
(
'timed out!'
)
>=
0
or
s
.
find
(
'Return code: -9'
)
>=
0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录