<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">Great, thanks for the leads! I will let you know if I make progress</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 16, 2019 at 5:40 PM Bruno Oliveira <<a href="mailto:nicoddemus@gmail.com">nicoddemus@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi Elijah,<div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 16, 2019 at 6:29 PM Elijah DeLee <<a href="mailto:kdelee@redhat.com" target="_blank">kdelee@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:monospace,monospace">Reference issue: <a href="https://github.com/ansible/pytest-mp/issues/18" style="font-family:Arial,Helvetica,sans-serif" target="_blank">https://github.com/ansible/pytest-mp/issues/18</a></div><div style="font-family:monospace,monospace"><br></div><div style="font-family:monospace,monospace"><br></div><div style="font-family:monospace,monospace">I'm having trouble knowing where to start looking. Can anyone give me a clue at what point the tests get recorded into the cache?</div></div></blockquote><div><br></div><div>The last-failed support is done inside cacheprovider in an implementation of the pytest_runtest_logreport[1] hook. </div><div><br></div><div>The last-failed support works with pytest-xdist, but because there's special pytest-xdist handling in the pytest_sessionfinish hook[2]; the "hasattr(config, 'slaveinput')"</div><div>is an implementation detail that LFPlugin is using to avoid having the workers also trying to write to the cache.</div><div><br></div><div>If the problem is indeed that the workers of the pytest-mp plugin are trying to write to the cache at the same time, you can check if that's the case by inserting a </div><div>"slaveinput" attribute into the config object in the workers, and see if that fixes it. </div><div><br></div><div>[1]: <a href="https://github.com/pytest-dev/pytest/blob/master/src/_pytest/cacheprovider.py#L193" target="_blank">https://github.com/pytest-dev/pytest/blob/master/src/_pytest/cacheprovider.py#L193</a></div><div>[2]: <a href="https://github.com/pytest-dev/pytest/blob/master/src/_pytest/cacheprovider.py#L261" target="_blank">https://github.com/pytest-dev/pytest/blob/master/src/_pytest/cacheprovider.py#L261</a></div><div><br></div><div>Cheers,</div><div>Bruno</div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><span style="font-family:monospace,monospace">Elijah DeLee</span></div><div><span style="font-family:monospace,monospace">------------------<br></span></div><div><span style="font-family:monospace,monospace">Quality Engineer</span></div></div></div></div></div></div></div></div>