Skip to content

Commit

Permalink
Debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
kssenii committed Oct 25, 2023
1 parent 6068277 commit de8064d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<clickhouse>
<s3queue_log>
<database>system</database>
<table>s3queue_log</table>
</s3queue_log>
</clickhouse>
27 changes: 26 additions & 1 deletion tests/integration/test_storage_s3_queue/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,19 @@ def started_cluster():
"configs/defaultS3.xml",
"configs/named_collections.xml",
"configs/zookeeper.xml",
"configs/s3queue_log.xml",
],
)
cluster.add_instance(
"instance2",
user_configs=["configs/users.xml"],
with_minio=True,
with_zookeeper=True,
main_configs=["configs/defaultS3.xml", "configs/named_collections.xml"],
main_configs=[
"configs/defaultS3.xml",
"configs/named_collections.xml",
"configs/s3queue_log.xml",
],
)

logging.info("Starting cluster...")
Expand Down Expand Up @@ -661,6 +666,17 @@ def get_count(table_name):
break
time.sleep(1)

if (
get_count(f"{dst_table_name}_1")
+ get_count(f"{dst_table_name}_2")
+ get_count(f"{dst_table_name}_3")
) != files_to_generate:
info = node.query(
f"SELECT * FROM system.s3queue_log WHERE zookeeper_path like '%{table_name}' ORDER BY file_name FORMAT Vertical"
)
logging.debug(info)
assert False

res1 = [
list(map(int, l.split()))
for l in node.query(
Expand Down Expand Up @@ -731,6 +747,15 @@ def get_count(node, table_name):
break
time.sleep(1)

if (
get_count(node, dst_table_name) + get_count(node_2, dst_table_name)
) != files_to_generate:
info = node.query(
f"SELECT * FROM system.s3queue_log WHERE zookeeper_path like '%{table_name}' ORDER BY file_name FORMAT Vertical"
)
logging.debug(info)
assert False

get_query = f"SELECT column1, column2, column3 FROM {dst_table_name}"
res1 = [list(map(int, l.split())) for l in run_query(node, get_query).splitlines()]
res2 = [
Expand Down

0 comments on commit de8064d

Please sign in to comment.