Open BasitAli opened 1 year ago
Playing around with it more suggests this may not necessarily be a docker / container issue. Disabling / Enabling some imports shows different behaviour in and out of the container. I thought I had singled out the bug to a single dependency but that still doesn't resolve it. Playing around with it more on an empty project in an attempt to get to the root of the problem.
@BasitAli Do you have any idea why this happens? I've found that we get these files when we run testmon in our remote VM .
@BasitAli Do you have any idea why this happens? I've found that we get these files when we run testmon in our remote VM .
Unfortunately, I failed to make any progress in resolving or identifying the root cause for it. However, I worked around the issue by retrying the pytest --testmon --no-cov
command when it first fails. This is what my workflow step for looks like,
- name: Update testmon database
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 2
retry_on: error
command: 'pytest --testmon --no-cov'
The WAL mode (the pragma) should improve the parallel processing and therefore behaviour of testmon under xdist.
I don't see how could different tests were collected between gw1 and gw0
depend on --no-cov.
I think the problem happens when generating the database. Running the tests is the after-effect I believe.
On Wed, Nov 15, 2023, 6:32 PM Tibor Arpas @.***> wrote:
The WAL mode (the pragma) should improve the parallel processing and therefore behaviour of testmon under xdist.
I don't see how could different tests were collected between gw1 and gw0 depend on --no-cov.
— Reply to this email directly, view it on GitHub https://github.com/tarpas/pytest-testmon/issues/219#issuecomment-1812543356, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGUIDU6CJJWM6IYA6WIP4DYES75JAVCNFSM6AAAAAAYMDLNMKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJSGU2DGMZVGY . You are receiving this because you were mentioned.Message ID: @.***>
I think the problem happens when generating the database. Running the tests is the after-effect I believe.
I'm not following.
What is your setup and what steps did you do? When running pytest under a container or GitHub Actions ends up with the the following files
This is how I run the tests on Docker,
What was the outcome?
With these additional temporary files, subsequent runs with
--testmon-nocollect
still work in our pull requests, but if I run--test-mon --no-cov
it fails with xdist errordifferent tests were collected between gw1 and gw0
.What did you expect instead?
I would have expected the temporary files to be cleared and I should only end up with .testmondata. Disabling the following line db.py seems to resolve this.
What is your operating system and it's version please?
I see the same issue on Docker inside WSL as well as on GitHub Actions. Everything works fine when I execute these commands on Ubuntu itself.