Skip to content

tests: fix 01676_long_clickhouse_client_autocomplete flakiness#43819

Merged
rschu1ze merged 5 commits intoClickHouse:masterfrom
azat:tests/01676_clickhouse_client_autocomplete
Dec 4, 2022
Merged

tests: fix 01676_long_clickhouse_client_autocomplete flakiness#43819
rschu1ze merged 5 commits intoClickHouse:masterfrom
azat:tests/01676_clickhouse_client_autocomplete

Conversation

@azat
Copy link
Copy Markdown
Member

@azat azat commented Nov 30, 2022

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

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 )

@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-not-for-changelog This PR should not be mentioned in the changelog label Nov 30, 2022
@azat azat marked this pull request as draft November 30, 2022 05:12
@azat azat changed the title tests: add debuglog support for 01676_long_clickhouse_client_autocomplete tests: fix 01676_long_clickhouse_client_autocomplete flakiness Nov 30, 2022
@azat azat force-pushed the tests/01676_clickhouse_client_autocomplete branch from ad28a9f to 043771b Compare November 30, 2022 10:10
@azat azat marked this pull request as ready for review November 30, 2022 10:10
azat added 5 commits November 30, 2022 19:36
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]>
@azat azat force-pushed the tests/01676_clickhouse_client_autocomplete branch from 043771b to 02b5d9a Compare November 30, 2022 18:43
@rschu1ze rschu1ze self-assigned this Dec 2, 2022
@rschu1ze rschu1ze merged commit ddd5323 into ClickHouse:master Dec 4, 2022
@azat azat deleted the tests/01676_clickhouse_client_autocomplete branch December 5, 2022 09:44
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

01676_long_clickhouse_client_autocomplete is flaky

3 participants