Great, thanks for the leads! I will let you know if I make progress On Thu, May 16, 2019 at 5:40 PM Bruno Oliveira <nicodde...@gmail.com> wrote:
> Hi Elijah, > > > On Thu, May 16, 2019 at 6:29 PM Elijah DeLee <kde...@redhat.com> wrote: > >> Reference issue: https://github.com/ansible/pytest-mp/issues/18 >> >> >> 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? >> > > The last-failed support is done inside cacheprovider in an implementation > of the pytest_runtest_logreport[1] hook. > > 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')" > is an implementation detail that LFPlugin is using to avoid having the > workers also trying to write to the cache. > > 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 > "slaveinput" attribute into the config object in the workers, and see if > that fixes it. > > [1]: > https://github.com/pytest-dev/pytest/blob/master/src/_pytest/cacheprovider.py#L193 > [2]: > https://github.com/pytest-dev/pytest/blob/master/src/_pytest/cacheprovider.py#L261 > > Cheers, > Bruno > -- Elijah DeLee ------------------ Quality Engineer
_______________________________________________ pytest-dev mailing list pytest-dev@python.org https://mail.python.org/mailman/listinfo/pytest-dev