Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zc.lockfile.LockError handling to locks.file_lock #42

Merged
merged 1 commit into from Oct 30, 2020

Conversation

mshriver
Copy link
Contributor

@mshriver mshriver commented Oct 29, 2020

Following @StabbarN lead for issue #38 and fix in #39, I added a timeout loop and exception handling for the exception raised by zc.lockfile.

Working on getting tox to run for your unit tests, figured I would open the PR in the meanwhile.

Testing against SatelliteQE/Robottelo unit tests where this was encountered after the update to pytest-services 2.2.0 is successful, for what its worth.


This change is Reviewable

@bubenkoff
Copy link
Member

@mshriver please add a changelog record and update the authors file

mshriver added a commit to SatelliteQE/robottelo that referenced this pull request Oct 29, 2020
Following the fix for pytest-dev#38 by pytest-dev#39, I added a timeout loop and exception handling for the exception raised by zc.lockfile

Add myself to AUTHORS.rst as contributor
Include description of pytest-dev#42 in CHANGES.rst as Unreleased
@@ -10,6 +10,7 @@ These people have contributed to `pytest-services`, in alphabetical order:
* `Dmitrijs Milajevs <dimazest@gmail.com>`_
* `Jason R. Coombs <jaraco@jaraco.com>`_
* `Joep van Dijken <joepvandijken@github.com>`_
* `Magnus Staberg <magnus@staberg.io>`_
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping with the alphabetical order request at L7

@bubenkoff
Copy link
Member

@mshriver travis seems to be stuck

@coveralls
Copy link

coveralls commented Oct 30, 2020

Coverage Status

Coverage decreased (-0.7%) to 70.772% when pulling 705bfd8 on mshriver:fix-zc-lock-file into 451debd on pytest-dev:master.

@mshriver
Copy link
Contributor Author

mshriver commented Oct 30, 2020

@bubenkoff I've noticed travis taking quite some time to start builds, but it looks like it ran and completely successfully since you mentioned it being stuck. That being said, I should add a file_lock unit test, as I don't see one currently. I would hate to fix it for my use and break it for someone else.

** On second look, it is used in the unit tests through locked_resources context manager, used by the fixtures. Existing unit tests should provide coverage.

@bubenkoff bubenkoff merged commit a7b2c2e into pytest-dev:master Oct 30, 2020
@bubenkoff
Copy link
Member

@mshriver thanks, 2.2.1 is out

@mshriver
Copy link
Contributor Author

@bubenkoff Thanks so much! Really appreciate your time to review and merge this. Thanks @StabbarN for the original fix pattern, made it incredibly easy to identify and resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants