-
Notifications
You must be signed in to change notification settings - Fork 107
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
fix(consume,plugins): Fix suite duplication due to xdist, consume cli refactor #712
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice! LGTM.
I'm going create a small PR based on this to split pytest_commands.py
to the following within src/cli
:
pytest_commands/
├── common.py
├── consume.py
├── fill.py
└── __init__.py
...
├── execute.py
├── fuzzer.py
It should keep things clean when adding execute/fuzzer!
Feel free to merge this or wait for my small refactor :D
Just so I understand this essentially means running |
You can either launch Basically we could reduce the code in the hive cluster script. |
🗒️ Description
Fixes
test_suite
fixture from spawning duplicated test suites when xdist is used.Reason being that xdist spawns a different process per worker to distribute the load, and the
session
ormodule
scoped fixtures are not really shared between them.Fix is to use the file system to create global locks per consume session, achieved by creating a temporary folder that is unique to each consume instance and is shared between the xdist processes, but do not disrupt other consume sessions.
The fixture also creates a lock per test-suite, so it is possible to run different test suites (i.e. one for
rlp
and one forengine
) in the same consume instance.Consume commands were also refactored to reduce code and
consume hive
command is now available which runs test suites ofconsume rlp
andconsume engine
simultaneously.🔗 Related Issues
✅ Checklist
mkdocs serve
locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.