update test_hive_query

This commit is contained in:
lgbo-ustc 2022-01-07 12:22:57 +08:00 committed by liangjiabiao
parent cc3fdb8318
commit 6a6b6594c3

View File

@ -106,7 +106,15 @@ def test_parquet_groupby_with_cache(started_cluster):
assert result == expected_result
def test_cache_read_bytes(started_cluster):
node = started_cluster.instances['h0_0_0']
time.sleep(10)
result = node.query("""
SELECT day, count(*) FROM default.demo_parquet group by day order by day
""")
expected_result = """2021-11-01 1
2021-11-05 2
2021-11-11 1
2021-11-16 2
"""
assert result == expected_result
result = node.query("select sum(ProfileEvent_ExternalDataSourceLocalCacheReadBytes) from system.metric_log where ProfileEvent_ExternalDataSourceLocalCacheReadBytes > 0")
logging.info("Read bytes from cache:{}".format(result))
assert result.strip() != '0'