Closed
Bug 1338531
Opened 7 years ago
Closed 7 years ago
[mozlog] suite_start message is never sent when using pytest-mozlog and pytest-xdist
Categories
(Testing :: Mozbase, defect)
Tracking
(firefox54 fixed)
RESOLVED
FIXED
mozilla54
Tracking | Status | |
---|---|---|
firefox54 | --- | fixed |
People
(Reporter: davehunt, Assigned: davehunt, Mentored)
References
Details
Attachments
(1 file)
Running pytest tests with pytest-mozlog and pytest-xdist does not send the suite_start message, therefore all test_start messages fail with the error: "Got test_start message before suite_start for test XXXX" Steps to replicate: 1. Install mozlog from mozilla-central and pytest from PyPI 2. Run a suite with "--log-mach=- -n=1" Expected: 1. "SUITE_START" and "TEST_START" messages appear in the console. Actual: 1. "ERROR Got test_start message before suite_start for test XXX". 2. "ERROR Got suite_end message before suite_start". 3. SUITE_START and TEST_START messages do not appear in the console.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → dave.hunt
Status: NEW → ASSIGNED
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8836802 [details] Bug 1338531 - [mozlog] Collect tests when using pytest-xdist and send suite_start when the first test starts. https://reviewboard.mozilla.org/r/112124/#review113732 ::: testing/mozbase/mozlog/mozlog/pytest_mozlog/plugin.py:66 (Diff revision 2) > + def pytest_xdist_node_collection_finished(self, node, ids): > + '''Called after each pytest-xdist node collection is completed''' > + self._log_suite_start(ids) I'm not familiar with pytest-xdist.. Will this pass in a different set of tests each time? If so, then only the first batch will be reported in the suite_start message. In that case it would probably be better not to log any tests at all. If not, then please close this issue.
Attachment #8836802 -
Flags: review?(ahalberstadt) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8836802 [details] Bug 1338531 - [mozlog] Collect tests when using pytest-xdist and send suite_start when the first test starts. https://reviewboard.mozilla.org/r/112124/#review113746 ::: testing/mozbase/mozlog/mozlog/pytest_mozlog/plugin.py:66 (Diff revision 2) > + def pytest_xdist_node_collection_finished(self, node, ids): > + '''Called after each pytest-xdist node collection is completed''' > + self._log_suite_start(ids) I checked with the owner of pytest-xdist beforehand, and every node has an identical set of tests. If they ever collected a different set of tests, pytest would raise an exception anway.
Pushed by dhunt@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9a6977ca4eae [mozlog] Collect tests when using pytest-xdist and send suite_start when the first test starts. r=ahal
Comment 7•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9a6977ca4eae
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in
before you can comment on or make changes to this bug.
Description
•