Skip to content

Minor improvements in clickhouse-test#29197

Merged
tavplubix merged 3 commits intomasterfrom
clickhouse_test_improvements
Sep 22, 2021
Merged

Minor improvements in clickhouse-test#29197
tavplubix merged 3 commits intomasterfrom
clickhouse_test_improvements

Conversation

@tavplubix
Copy link
Copy Markdown
Member

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Detailed description / Documentation draft:
Refactored code a bit, fixed behavior around need_retry and restarted_tests.

@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Sep 20, 2021
@tavplubix tavplubix force-pushed the clickhouse_test_improvements branch from 3dba197 to 5f15a79 Compare September 21, 2021 06:07
@vdimir vdimir self-assigned this Sep 21, 2021
@tavplubix tavplubix merged commit e0ce179 into master Sep 22, 2021
@tavplubix tavplubix deleted the clickhouse_test_improvements branch September 22, 2021 08:42
failed_to_check = False

pid = os.getpid()
query = f"SELECT 'Running test {suite}/{case} from pid={pid}';"
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.

suite is TestSuite and it does not have __str__ method.

azat added a commit to azat/ClickHouse that referenced this pull request Sep 27, 2021
Right now it is possible to get the following error:

    Having 20 errors! 0 tests passed. 0 tests skipped. 57.37 s elapsed (MainProcess).
    Won't run stateful tests because test data wasn't loaded.
    Traceback (most recent call last):
      File "/usr/lib/python3.9/multiprocessing/managers.py", line 802, in _callmethod
        conn = self._tls.connection
    AttributeError: 'ForkAwareLocal' object has no attribute 'connection'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/src/ch/clickhouse/.cmake/../tests/clickhouse-test", line 1462, in <module>
        main(args)
      File "/src/ch/clickhouse/.cmake/../tests/clickhouse-test", line 1261, in main
        if len(restarted_tests) > 0:
      File "<string>", line 2, in __len__
      File "/usr/lib/python3.9/multiprocessing/managers.py", line 806, in _callmethod
        self._connect()
      File "/usr/lib/python3.9/multiprocessing/managers.py", line 793, in _connect
        conn = self._Client(self._token.address, authkey=self._authkey)
      File "/usr/lib/python3.9/multiprocessing/connection.py", line 507, in Client
        c = SocketClient(address)
      File "/usr/lib/python3.9/multiprocessing/connection.py", line 635, in SocketClient
        s.connect(address)
    ConnectionRefusedError: [Errno 111] Connection refused

The reason behind this is that manager's thread got terminated:

    ipdb> p restarted_tests._manager._process
    <ForkProcess name='SyncManager-1' pid=25125 parent=24939 stopped exitcode=-SIGTERM>

Refs: ClickHouse#29259 (cc: @vdimir)
Follow-up for: ClickHouse#29197 (cc: @tavplubix)
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.

4 participants