Skip to content

Commit b41e66b

Browse files
committed
test(logging): extend history startup timeout
1 parent 94c9bd6 commit b41e66b

4 files changed

Lines changed: 11 additions & 5 deletions

File tree

.github/actions/test_logs/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ runs:
44
using: "composite"
55
steps:
66
- uses: ./.github/actions/setup_test
7+
with:
8+
artifacts: sqllogictests,meta,query
79

810
- name: Install lsof
911
shell: bash

tests/logging/history_table/history_table_external.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ table_name = "login_history"
2323

2424
[[log.history.tables]]
2525
table_name = "access_history"
26+
27+
[[log.history.tables]]
28+
table_name = "lineage_unresolved"

tests/logging/history_table/setup_test_data.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ lineage_ready=false
7171
for _ in {1..30}; do
7272
lineage_response=$(execute_query "SELECT count_if(source_database IN ('lineage_history_objects', 'lineage_history_columns', 'lineage_history_views', 'lineage_history_statements') OR target_database IN ('lineage_history_objects', 'lineage_history_columns', 'lineage_history_views', 'lineage_history_statements')) AS captured_edges, count_if(target_database = 'lineage_history_lifecycle') AS lifecycle_edges, count_if(source_catalog = 'lineage_history_iceberg_catalog' AND source_database = 'lineage_db' AND target_database = 'lineage_history_iceberg') AS iceberg_edges, count_if(target_database = 'lineage_history_views' AND target_name IN ('src_view', 'view_dst')) AS view_edges FROM system_history.lineage_unresolved")
7373
if [ "$(echo "$lineage_response" | jq -r '.state')" = "Failed" ]; then
74-
echo "Lineage readiness query failed"
75-
echo "$lineage_response" | jq '.error'
76-
exit 1
74+
# The history transform creates its destination table asynchronously. Treat a missing table
75+
# like any other not-ready state and report the last response if the poll eventually times out.
76+
sleep 1
77+
continue
7778
fi
7879
lineage_count=$(echo "$lineage_response" | jq -r '.data[0][0] // 0')
7980
lifecycle_count=$(echo "$lineage_response" | jq -r '.data[0][1] // 0')

tests/logging/test-history-tables.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ echo 'Start databend-query node-1'
102102
nohup env RUST_BACKTRACE=1 target/${BUILD_PROFILE}/databend-query -c scripts/ci/deploy/config/databend-query-node-1.toml --internal-enable-sandbox-tenant >./.databend/query-1.out 2>&1 &
103103

104104
echo "Waiting on node-1..."
105-
python3 scripts/ci/wait_tcp.py --timeout 30 --port 9091
105+
python3 scripts/ci/wait_tcp.py --timeout 50 --port 9091
106106

107107
echo 'Start databend-query node-2'
108108
env "RUST_BACKTRACE=1" nohup target/${BUILD_PROFILE}/databend-query -c scripts/ci/deploy/config/databend-query-node-2.toml --internal-enable-sandbox-tenant >./.databend/query-2.out 2>&1 &
109109

110110
echo "Waiting on node-2..."
111-
python3 scripts/ci/wait_tcp.py --timeout 30 --port 9092
111+
python3 scripts/ci/wait_tcp.py --timeout 50 --port 9092
112112

113113
echo "Started 2-node cluster with history tables enabled..."
114114

0 commit comments

Comments
 (0)