Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
ad01e877
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,发现更多精彩内容 >>
提交
ad01e877
编写于
12月 07, 2020
作者:
V
Vitaly Baranov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Mark grpc protocol's tests as non-flaky.
上级
559afe02
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
25 deletion
+0
-25
tests/integration/test_grpc_protocol/test.py
tests/integration/test_grpc_protocol/test.py
+0
-22
tests/integration/test_grpc_protocol_ssl/test.py
tests/integration/test_grpc_protocol_ssl/test.py
+0
-3
未找到文件。
tests/integration/test_grpc_protocol/test.py
浏览文件 @
ad01e877
...
...
@@ -138,15 +138,12 @@ def reset_after_test():
# Actual tests
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_select_one
():
assert
query
(
"SELECT 1"
)
==
"1
\n
"
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_ordinary_query
():
assert
query
(
"SELECT count() FROM numbers(100)"
)
==
"100
\n
"
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_insert_query
():
query
(
"CREATE TABLE t (a UInt8) ENGINE = Memory"
)
query
(
"INSERT INTO t VALUES (1),(2),(3)"
)
...
...
@@ -155,13 +152,11 @@ def test_insert_query():
query
(
"INSERT INTO t FORMAT TabSeparated"
,
input_data
=
"9
\n
10
\n
"
)
assert
query
(
"SELECT a FROM t ORDER BY a"
)
==
"1
\n
2
\n
3
\n
4
\n
5
\n
6
\n
7
\n
8
\n
9
\n
10
\n
"
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_insert_query_streaming
():
query
(
"CREATE TABLE t (a UInt8) ENGINE = Memory"
)
query
(
"INSERT INTO t VALUES"
,
input_data
=
[
"(1),(2),(3),"
,
"(5),(4),(6),"
,
"(7),(8),(9)"
])
assert
query
(
"SELECT a FROM t ORDER BY a"
)
==
"1
\n
2
\n
3
\n
4
\n
5
\n
6
\n
7
\n
8
\n
9
\n
"
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_insert_query_delimiter
():
query
(
"CREATE TABLE t (a UInt8) ENGINE = Memory"
)
query
(
"INSERT INTO t FORMAT CSV 1
\n
2"
,
input_data
=
[
"3"
,
"4
\n
5"
],
input_data_delimiter
=
'
\n
'
)
...
...
@@ -171,7 +166,6 @@ def test_insert_query_delimiter():
query
(
"INSERT INTO t FORMAT CSV 1
\n
2"
,
input_data
=
[
"3"
,
"4
\n
5"
])
assert
query
(
"SELECT a FROM t ORDER BY a"
)
==
"1
\n
5
\n
234
\n
"
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_insert_default_column
():
query
(
"CREATE TABLE t (a UInt8, b Int32 DEFAULT 100, c String DEFAULT 'c') ENGINE = Memory"
)
query
(
"INSERT INTO t (c, a) VALUES ('x',1),('y',2)"
)
...
...
@@ -181,20 +175,17 @@ def test_insert_default_column():
"3
\t
100
\t
c
\n
"
\
"4
\t
100
\t
c
\n
"
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_insert_splitted_row
():
query
(
"CREATE TABLE t (a UInt8) ENGINE = Memory"
)
query
(
"INSERT INTO t VALUES"
,
input_data
=
[
"(1),(2),("
,
"3),(5),(4),(6)"
])
assert
query
(
"SELECT a FROM t ORDER BY a"
)
==
"1
\n
2
\n
3
\n
4
\n
5
\n
6
\n
"
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_output_format
():
query
(
"CREATE TABLE t (a UInt8) ENGINE = Memory"
)
query
(
"INSERT INTO t VALUES (1),(2),(3)"
)
assert
query
(
"SELECT a FROM t ORDER BY a FORMAT JSONEachRow"
)
==
'{"a":1}
\n
{"a":2}
\n
{"a":3}
\n
'
assert
query
(
"SELECT a FROM t ORDER BY a"
,
output_format
=
"JSONEachRow"
)
==
'{"a":1}
\n
{"a":2}
\n
{"a":3}
\n
'
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_totals_and_extremes
():
query
(
"CREATE TABLE t (x UInt8, y UInt8) ENGINE = Memory"
)
query
(
"INSERT INTO t VALUES (1, 2), (2, 4), (3, 2), (3, 3), (3, 4)"
)
...
...
@@ -203,7 +194,6 @@ def test_totals_and_extremes():
assert
query
(
"SELECT x, y FROM t"
)
==
"1
\t
2
\n
2
\t
4
\n
3
\t
2
\n
3
\t
3
\n
3
\t
4
\n
"
assert
query_and_get_extremes
(
"SELECT x, y FROM t"
,
settings
=
{
"extremes"
:
"1"
})
==
"1
\t
2
\n
3
\t
4
\n
"
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_errors_handling
():
e
=
query_and_get_error
(
""
)
#print(e)
...
...
@@ -212,19 +202,16 @@ def test_errors_handling():
e
=
query_and_get_error
(
"CREATE TABLE t (a UInt8) ENGINE = Memory"
)
assert
"Table default.t already exists"
in
e
.
display_text
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_authentication
():
query
(
"CREATE USER john IDENTIFIED BY 'qwe123'"
)
assert
query
(
"SELECT currentUser()"
,
user_name
=
"john"
,
password
=
"qwe123"
)
==
"john
\n
"
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_logs
():
logs
=
query_and_get_logs
(
"SELECT 1"
,
settings
=
{
'send_logs_level'
:
'debug'
})
assert
"SELECT 1"
in
logs
assert
"Read 1 rows"
in
logs
assert
"Peak memory usage"
in
logs
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_progress
():
results
=
query_no_errors
(
"SELECT number, sleep(0.31) FROM numbers(8) SETTINGS max_block_size=2, interactive_delay=100000"
,
stream_output
=
True
)
#print(results)
...
...
@@ -259,7 +246,6 @@ def test_progress():
}
]"""
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_session
():
session_a
=
"session A"
session_b
=
"session B"
...
...
@@ -270,12 +256,10 @@ def test_session():
assert
query
(
"SELECT getSetting('custom_x'), getSetting('custom_y')"
,
session_id
=
session_a
)
==
"1
\t
2
\n
"
assert
query
(
"SELECT getSetting('custom_x'), getSetting('custom_y')"
,
session_id
=
session_b
)
==
"3
\t
4
\n
"
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_no_session
():
e
=
query_and_get_error
(
"SET custom_x=1"
)
assert
"There is no session"
in
e
.
display_text
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_input_function
():
query
(
"CREATE TABLE t (a UInt8) ENGINE = Memory"
)
query
(
"INSERT INTO t SELECT col1 * col2 FROM input('col1 UInt8, col2 UInt8') FORMAT CSV"
,
input_data
=
[
"5,4
\n
"
,
"8,11
\n
"
,
"10,12
\n
"
])
...
...
@@ -285,7 +269,6 @@ def test_input_function():
query
(
"INSERT INTO t SELECT col1 * col2 FROM input('col1 UInt8, col2 UInt8') FORMAT CSV 20,10
\n
"
,
input_data
=
"15,15
\n
"
)
assert
query
(
"SELECT a FROM t ORDER BY a"
)
==
"20
\n
88
\n
120
\n
143
\n
200
\n
225
\n
"
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_external_table
():
columns
=
[
clickhouse_grpc_pb2
.
NameAndType
(
name
=
'UserID'
,
type
=
'UInt64'
),
clickhouse_grpc_pb2
.
NameAndType
(
name
=
'UserName'
,
type
=
'String'
)]
ext1
=
clickhouse_grpc_pb2
.
ExternalTable
(
name
=
'ext1'
,
columns
=
columns
,
data
=
'1
\t
Alex
\n
2
\t
Ben
\n
3
\t
Carl
\n
'
,
format
=
'TabSeparated'
)
...
...
@@ -303,7 +286,6 @@ def test_external_table():
assert
query
(
"SELECT * FROM _data ORDER BY _2"
,
external_tables
=
[
unnamed_table
])
==
"7
\t
Fred
\n
"
\
"6
\t
George
\n
"
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_external_table_streaming
():
columns
=
[
clickhouse_grpc_pb2
.
NameAndType
(
name
=
'UserID'
,
type
=
'UInt64'
),
clickhouse_grpc_pb2
.
NameAndType
(
name
=
'UserName'
,
type
=
'String'
)]
def
send_query_info
():
...
...
@@ -319,7 +301,6 @@ def test_external_table_streaming():
"4
\t
Daniel
\n
"
\
"5
\t
Ethan
\n
"
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_simultaneous_queries_same_channel
():
threads
=
[]
try
:
...
...
@@ -331,7 +312,6 @@ def test_simultaneous_queries_same_channel():
for
thread
in
threads
:
thread
.
join
()
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_simultaneous_queries_multiple_channels
():
threads
=
[]
try
:
...
...
@@ -343,7 +323,6 @@ def test_simultaneous_queries_multiple_channels():
for
thread
in
threads
:
thread
.
join
()
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_cancel_while_processing_input
():
query
(
"CREATE TABLE t (a UInt8) ENGINE = Memory"
)
def
send_query_info
():
...
...
@@ -356,7 +335,6 @@ def test_cancel_while_processing_input():
assert
result
.
progress
.
written_rows
==
6
assert
query
(
"SELECT a FROM t ORDER BY a"
)
==
"1
\n
2
\n
3
\n
4
\n
5
\n
6
\n
"
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_cancel_while_generating_output
():
def
send_query_info
():
yield
clickhouse_grpc_pb2
.
QueryInfo
(
query
=
"SELECT number, sleep(0.2) FROM numbers(10) SETTINGS max_block_size=2"
)
...
...
tests/integration/test_grpc_protocol_ssl/test.py
浏览文件 @
ad01e877
...
...
@@ -73,18 +73,15 @@ def start_cluster():
# Actual tests
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_secure_channel
():
with
create_secure_channel
()
as
channel
:
assert
query
(
"SELECT 'ok'"
,
channel
)
==
"ok
\n
"
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_insecure_channel
():
with
pytest
.
raises
(
grpc
.
FutureTimeoutError
):
with
create_insecure_channel
()
as
channel
:
query
(
"SELECT 'ok'"
,
channel
)
@
pytest
.
mark
.
skip
(
reason
=
"Flaky"
)
def
test_wrong_client_certificate
():
with
pytest
.
raises
(
grpc
.
FutureTimeoutError
):
with
create_insecure_channel
()
as
channel
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录