<div dir="ltr">Hi Isaul!<br><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 25, 2016 at 5:42 PM Isaul Vargas <<a href="mailto:isaulv@gmail.com">isaulv@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi everyone! My name is Isaul Vargas and I work as a software tester. <br></div><div>I have been using py.test since 2013 and I really like the fixture interface of<br></div><div>Py.test it's a powerful abstraction!<br>...</div><div>So, I've decided to volunteer my time to help improve the Pytest-xdist plugin so that we have a <br></div><div>true queue based system of test distribution so that every slot is always busy running tests, and save<br></div><div>developers a ton of time!<br></div></div></blockquote><div><br></div><div> Excellent, thanks for your enthusiasm and willingness to contribute! It is certainly appreciated. :)</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I would like to thank Ronny for taking the time to explain how the current system works, and what <br></div><div>changes are needed to make this happen. I am motivated to get this issue fixed; so that we are the <br></div><div>first test runner (that I know of) to use a queue based system that doesn't simply batch tests. <br></div></div></blockquote><div><br></div><div>I also wrote an overview here: <a href="https://github.com/pytest-dev/pytest-xdist/blob/master/OVERVIEW.md">https://github.com/pytest-dev/pytest-xdist/blob/master/OVERVIEW.md</a>. </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>For those wondering why batching is bad, when you have tests that take 2-3 minutes to complete, <br>plus a few tests that take 5 minutes to complete; if you batch tests such that 1 workers gets all the 5 minutes tests<br></div><div>and another workers gets all the short tests then the total run time is almost the same as running all the large tests<br></div><div>in serial. <br></div></div></blockquote><div><br></div><div>I feel you. We had a similar problem at work as well. </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I look forward to improving this aspect of pytest-xdist, and I am highly motivated to get this done. I look forward<br></div><div>to diving deep into the code and learn the internals of pytest.<br></div></div></blockquote><div><br></div><div>We had discussed how to avoid distributing tests in batches, and if I remember correctly it was a matter of changing some logic[1] in DSession so it just sends a single test for each node. There is also the restriction that each node must have at least 2 tests to start running them due to how the pytest_runtest_protocol hook works [2].</div><div><br></div><div>My suggestion is to hack it into your fork until you get the speed up you want (of course feel free to ask for help), and then we can discuss the best way to implement it and put it as an user option.</div><div><br></div><div>[1] <a href="https://github.com/pytest-dev/pytest-xdist/blob/master/xdist/dsession.py#L311">https://github.com/pytest-dev/pytest-xdist/blob/master/xdist/dsession.py#L311</a></div><div>[2] <a href="http://pytest.org/latest/writing_plugins.html#_pytest.hookspec.pytest_runtest_protocol">http://pytest.org/latest/writing_plugins.html#_pytest.hookspec.pytest_runtest_protocol</a></div><div><br></div><div>Cheers,</div><div>Bruno.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div></div>
_______________________________________________<br>
pytest-dev mailing list<br>
<a href="mailto:pytest-dev@python.org" target="_blank">pytest-dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/pytest-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/pytest-dev</a><br>
</blockquote></div></div>