Skip to content

Fix flaky DNS cache test#80765

Merged
pufit merged 2 commits intomasterfrom
pufit/fix-flaky-dns-cache-test
May 30, 2025
Merged

Fix flaky DNS cache test#80765
pufit merged 2 commits intomasterfrom
pufit/fix-flaky-dns-cache-test

Conversation

@pufit
Copy link
Copy Markdown
Member

@pufit pufit commented May 24, 2025

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Closes #75982

@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented May 24, 2025

Workflow [PR], commit [d62576d]

@clickhouse-gh clickhouse-gh bot added the pr-ci label May 24, 2025
@pufit pufit added the 🍃 green ci 🌿 Fixing flaky tests in CI label May 24, 2025
with pytest.raises(QueryRuntimeException):
node3.query(f"SELECT * FROM remote('{node_name}', 'system', 'one')")
else:
logging.warning("Spent too much time on restart, skip short-update test")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my understanding, if restart_elapsed >=8, the DNS cache might be refreshed, and the query might connect to the node. Is it correct?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I've added a comment about it

restart_elapsed = time.time() - restart_start_time

if restart_elapsed < 8:
with pytest.raises(QueryRuntimeException):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can use node3.query_and_get_error instead of with pytest.raises(QueryRuntimeException):

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message may vary. Better to keep it that way

@tuanpach tuanpach self-assigned this May 27, 2025
@pufit pufit added this pull request to the merge queue May 30, 2025
@pufit pufit removed this pull request from the merge queue due to a manual request May 30, 2025
@pufit pufit requested a review from tuanpach May 30, 2025 04:42
@pufit pufit added this pull request to the merge queue May 30, 2025
Merged via the queue into master with commit 018b9f8 May 30, 2025
120 checks passed
@pufit pufit deleted the pufit/fix-flaky-dns-cache-test branch May 30, 2025 15:50
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-synced-to-cloud The PR is synced to the cloud repo label May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍃 green ci 🌿 Fixing flaky tests in CI pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integration test test_dns_cache is flaky

3 participants