tests: fix 01676_long_clickhouse_client_autocomplete flakiness#43819
Merged
rschu1ze merged 5 commits intoClickHouse:masterfrom Dec 4, 2022
Merged
Conversation
ad28a9f to
043771b
Compare
Signed-off-by: Azat Khuzhin <[email protected]>
…lete This will help to debug ClickHouse#43809 Follow-up for: ClickHouse#38728 Signed-off-by: Azat Khuzhin <[email protected]>
Signed-off-by: Azat Khuzhin <[email protected]>
Previusly it works incorrectly, timeout does not work when some stdin attached for expect, and so the test was wrong. Also this test requires small timeout since it waits in the loop until the completion will be loaded. So to make the test more clean, add a message when is_done is set to 1, and update the reference file. And also cleanup the test to reduce copy-paste. Signed-off-by: Azat Khuzhin <[email protected]>
In case of stdin is not attached (EOF), then expect will also close stdout, fix this by openning stdout again. Signed-off-by: Azat Khuzhin <[email protected]>
043771b to
02b5d9a
Compare
azat
added a commit
to azat/ClickHouse
that referenced
this pull request
Feb 23, 2023
By default expect matches patterns against output from the current process, however if you don't have stdin attached (like the case for CI), you will not have anything to check against, hence "timeout" simply does not work. Likely expect has $any_spawn_id (another option is to put expect_after after spawn). v2: use $any_spawn_id Refs: ClickHouse#43819 Signed-off-by: Azat Khuzhin <[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.
Changelog category (leave one):
Previusly it works incorrectly, timeout does not work when some stdin
attached for expect, and so the test was wrong.
Also this test requires small timeout since it waits in the loop until
the completion will be loaded.
So to make the test more clean, add a message when is_done is set to 1,
and update the reference file.
And also cleanup the test to reduce copy-paste.
Follow-up for: #38728
Fixes: #43809 (cc @tavplubix @alexey-milovidov )