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
pytest_plugin doesn't work with pytest-xdist #11
Comments
I am encountering the exact same problem, which prevents us from running our tests on TC in an adequate amount of time |
Which version of TC do you use? |
In any case, the http://youtrack.jetbrains.com/issue/TW-4998 should help. Let's watch/vote for it. |
@leo-from-spb |
In TC 8.x.x we can use flow ids, so the TW-4998 must help. But this feature is not implemented yet. You're welcome to vote for. |
Ooo :) I hadn't seen flow ids in the service messages documentation before, thanks for pointing that out. The second part of the problem is that pytest-xdist is capturing some of the teamcity service messages. |
I did some hacking. pytest-xdist has |
I filed a bug against pytest-xdist here: https://bitbucket.org/hpk42/pytest/issue/382/pytest-xdist-doesnt-call |
We are currently using TeamCity 7.1.5, the versions of the other components exactly match the ones curzona uses. |
While the latest pytest-xdist release fixes the original issue, we are now facing the problem that teamcity-messages is not sending the messages about finishing a test suite and finishing a test in the correct order, which leads to tests being assigned to the wrong test suite. For us, this destroys the value of the running time time series (which is linked to test suite + test name) which we use as a proxy for performance testing. |
Please tell me exact versions of pytest-xdist and teamcity-messages |
teamcity-messages 1.8, xdist 1.11, pytest 2.6.3 on Python 2.7.8 |
It was almost rewritten since then, could you try teamcity-messages from master branch? If it is still fails, could you prepare a test case for me to reproduce the problem? |
The problem still persists even when using the master branch. I tried uploading the test case into a github repo, but my employer blocks commits, so I'm afraid I'll have to paste it here.
From a sample captured stdout:
It seems to us that here, TestSuite2.test_1sec for example, will be incorrectly attributed to the TCMessages/test_suite_1.py file. |
Ok, I see two problems (notes for myself):
|
Notes:
|
Everyone, please check 1.10 release |
When I run
py.test -n 8 teamcity
to parallelize my test; testSuiteStarted, testStarted, and testSuiteFinished messages are missing.Without xdist:
With xdist:
The text was updated successfully, but these errors were encountered: