Repository navigation
Revert "Revert "Remove test_storage_nats"" - #93616
Merged
alexey-milovidov merged 1 commit intoJan 7, 2026
Merged
Conversation
alexey-milovidov
deleted the
revert-92155-revert-92140-remove-test-nats
branch
January 7, 2026 17:56
Contributor
|
Workflow [PR], commit [9d48e5a] Summary: ⏳
|
pull Bot
pushed a commit
to AKJUS/ClickHouse
that referenced
this pull request
Jul 30, 2026
`tests/integration/test_storage_nats/test_nats_core.py` and `test_nats_jet_stream.py`, together with `common.py`, the test configs, the Protobuf schema and the JSON reference, were removed in ClickHouse#93616 - a re-removal of ClickHouse#92140 after ClickHouse#92155 had restored them. Restore them and fix what has drifted since, so that they pass instead of timing out. Four things had to be reconciled with the current `master`: - Waiting for the consumer, not just for the view. Refusing a direct `SELECT` only proves that a materialized view is attached; the background streaming task subscribes to the subjects a moment later. Core NATS has no backlog, so messages published in that window are dropped and never reach the view - for example `test_nats_select` published 50 messages at `15:30:52.179` while the consumer subscribed at `15:30:52.215`, and then asserted on an empty view. `wait_for_mv_attached_to_table` now also waits for a fresh `Started streaming to N attached views` line, which the background task logs right after the consumer has subscribed. This is the same barrier `test_system_stop.py` already uses. - `configs/nats.xml` and `nats_certs.sh` reappeared in `master` with ClickHouse#107476, which added `test_system_stop.py` to the same directory. Keep those versions and re-add the `<nats>` credentials that the restored tests rely on to `nats.xml`. - `check_nats_is_available` no longer hangs on an unusable broker. `nats.connect` reports a TLS or an authentication failure through its error callback and then keeps retrying, so every NATS test ran into the 900 s pytest timeout with no indication of the cause - this is what all seven integration jobs of ClickHouse#100913 hit, because `ssl.create_default_context` enables `VERIFY_X509_STRICT` since Python 3.13 (the test images switched in d308407, after the tests were removed) and the certificate of the time was rejected with `CA cert does not include key usage extension`. The certificate is already fixed in `master`; bound the connect attempt as well and log what the client saw. - The `ruff` rules F401 (unused import) and F541 (`f`-string without placeholders) were enabled after the tests were removed, so drop the unused imports and the extraneous `f` prefixes. One expected error message lost its trailing period in the meantime, adjust the assertion accordingly. Verified locally against a `master` release binary: both modules pass in full, 33 tests each. Related: ClickHouse#100913 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reverts #92155
Failed in #93602