Skip to content

Fail *.test.py tests in case of srv start errors #342

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

Merged
merged 3 commits into from
Jun 7, 2022

Conversation

ylobankov
Copy link
Contributor

@ylobankov ylobankov commented Jun 6, 2022

When a tarantool server failed to start when running *.test.py tests,
the corresponding test was not considered by test-run as a failed test.
As a result of that, log artifacts were not gathered by test-run. Now
it is fixed.

Fixes #333

When a tarantool server failed to start when running *.test.py tests,
the corresponding test was not considered by test-run as a failed test.
As a result of that, log artifacts were not gathered by test-run. Now
it is fixed.

Fixes #333
@ylobankov ylobankov force-pushed the ylobankov/handle-server-start-errors-in-py-tests branch from 6b9a413 to b09dd5d Compare June 6, 2022 11:28
@ylobankov ylobankov requested a review from Totktonada June 6, 2022 11:28
@ylobankov ylobankov force-pushed the ylobankov/handle-server-start-errors-in-py-tests branch from a4d0bcf to 658018b Compare June 6, 2022 15:19
Copy link
Member

@Totktonada Totktonada left a comment

Choose a reason for hiding this comment

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

Visually ok, left several thoughts. Feel free to proceed.

ylobankov added 2 commits June 7, 2022 17:02
Before:
    [001] Worker "001_replication-py" cannot start tarantool server; the tasks will be ignored...
    [001] The raised exception is '
    [001] [Instance "master"] Failed to start
    [001] ' of type '<class 'lib.tarantool_server.TarantoolStartError'>'.
    [001] Worker "001_replication-py" received the following error:
    [001] Traceback (most recent call last):
    [001]   File "/Users/y.lobankov/Workspace/tarantool/test-run/lib/worker.py", line 259, in __init__
    [001]     self.inspector = suite.start_server(self.server)
    [001]   File "/Users/y.lobankov/Workspace/tarantool/test-run/lib/test_suite.py", line 245, in start_server
    [001]     server.deploy(silent=False)
    [001]   File "/Users/y.lobankov/Workspace/tarantool/test-run/lib/tarantool_server.py", line 759, in deploy
    [001]     self.start(silent=silent, **kwargs)
    [001]   File "/Users/y.lobankov/Workspace/tarantool/test-run/lib/tarantool_server.py", line 886, in start
    [001]     self.wait_until_started(wait_load, deadline)
    [001]   File "/Users/y.lobankov/Workspace/tarantool/test-run/lib/tarantool_server.py", line 1118, in wait_until_started
    [001]     self.wait_load(deadline)
    [001]   File "/Users/y.lobankov/Workspace/tarantool/test-run/lib/tarantool_server.py", line 1102, in wait_load
    [001]     if not self.logfile_pos.seek_wait(msg, p, self.name, deadline):
    [001]   File "/Users/y.lobankov/Workspace/tarantool/test-run/lib/tarantool_server.py", line 469, in seek_wait
    [001]     raise TarantoolStartError(name)
    [001] lib.tarantool_server.TarantoolStartError:
    [001] [Instance "master"] Failed to start
    [001]
    [001]

After:
    [001] Worker "001_replication-py" cannot start tarantool server; the tasks will be ignored...
    [001] The raised exception is '[Instance "master"] Failed to start' of type '<class 'lib.tarantool_server.TarantoolStartError'>'.
    [001] Worker "001_replication-py" received the following error:
    [001] Traceback (most recent call last):
    [001]   File "/Users/y.lobankov/Workspace/tarantool/test-run/lib/worker.py", line 259, in __init__
    [001]     self.inspector = suite.start_server(self.server)
    [001]   File "/Users/y.lobankov/Workspace/tarantool/test-run/lib/test_suite.py", line 245, in start_server
    [001]     server.deploy(silent=False)
    [001]   File "/Users/y.lobankov/Workspace/tarantool/test-run/lib/tarantool_server.py", line 777, in deploy
    [001]     self.start(silent=silent, **kwargs)
    [001]   File "/Users/y.lobankov/Workspace/tarantool/test-run/lib/tarantool_server.py", line 904, in start
    [001]     self.wait_until_started(wait_load, deadline)
    [001]   File "/Users/y.lobankov/Workspace/tarantool/test-run/lib/tarantool_server.py", line 1136, in wait_until_started
    [001]     self.wait_load(deadline)
    [001]   File "/Users/y.lobankov/Workspace/tarantool/test-run/lib/tarantool_server.py", line 1120, in wait_load
    [001]     if not self.logfile_pos.seek_wait(msg, p, self.name, deadline):
    [001]   File "/Users/y.lobankov/Workspace/tarantool/test-run/lib/tarantool_server.py", line 481, in seek_wait
    [001]     raise TarantoolStartError(name)
    [001] lib.tarantool_server.TarantoolStartError:
    [001] [Instance "master"] Failed to start
@ylobankov ylobankov force-pushed the ylobankov/handle-server-start-errors-in-py-tests branch from 658018b to 32af427 Compare June 7, 2022 14:09
@ylobankov ylobankov merged commit e221190 into master Jun 7, 2022
@ylobankov ylobankov deleted the ylobankov/handle-server-start-errors-in-py-tests branch June 7, 2022 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fail *.test.py tests in the case of catching server start errors
2 participants