Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cleanup in integration tests #31605

Merged

Conversation

vitlibar
Copy link
Member

@vitlibar vitlibar commented Nov 21, 2021

Changelog category:

  • Not for changelog

Fix cleanup in integration tests.

This PR fixes some flaky tests, for example test_part_moves_between_shards/, which sometimes suddenly failed with the error No such container.

@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Nov 21, 2021
# https://stackoverflow.com/questions/48767760/how-to-make-docker-container-ls-f-name-filter-by-exact-name
filter_name = f'^/{self.project_name}_.*_1$'
# We want the command "docker container list" to show only containers' ID and their names, separated by colon.
format = '{{.ID}}:{{.Names}}'
Copy link
Member Author

@vitlibar vitlibar Nov 21, 2021

Choose a reason for hiding this comment

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

Docker has changed the default format of the output of docker container list. In earlier versions this commands showed only IDs of the running containers, but currently by default it shows a table with the following header:

CONTAINER ID   IMAGE     COMMAND   CREATED       STATUS       PORTS     NAMES

So now we have to specify the format in the explicit way. '{{.ID}}:{{.Names}}' means we want to see only containers' ID and names, separated by colon.

@vitlibar
Copy link
Member Author

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Nov 21, 2021

update

✅ Branch has been successfully updated

@vitlibar vitlibar added the force tests The label does nothing, NOOP, None, nil label Nov 21, 2021
tests/integration/helpers/cluster.py Outdated Show resolved Hide resolved
@alesapin alesapin self-assigned this Nov 22, 2021
@vitlibar vitlibar force-pushed the fix-cleanup-in-integration-tests branch from cbf65df to 6f5f727 Compare November 22, 2021 09:06
@alesapin
Copy link
Member

Works.

@alesapin alesapin merged commit ef60796 into ClickHouse:master Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
force tests The label does nothing, NOOP, None, nil 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.

None yet

3 participants