Skip to content

Conversation

@amezin
Copy link
Collaborator

@amezin amezin commented Dec 20, 2022

Maximum number of tests scheduled in one step.

Setting it to 1 will force pytest to send tests to workers one by one - might be useful for a small number of slow tests.

Larger numbers will allow the scheduler to submit consecutive chunks of tests to workers - allows reusing fixtures.

Unlimited if not set.

Fixes #855
Fixes #255

@amezin amezin force-pushed the limit-sched-chunk-size branch from 0c23da7 to de012b9 Compare December 20, 2022 01:51
Maximum number of tests scheduled in one step.

Setting it to 1 will force pytest to send tests to workers one by one -
might be useful for a small number of slow tests.

Larger numbers will allow the scheduler to submit consecutive chunks of tests
to workers - allows reusing fixtures.

Unlimited if not set.

Fixes pytest-dev#855
@amezin amezin force-pushed the limit-sched-chunk-size branch from 1b0ebc7 to 8a7ef66 Compare December 20, 2022 01:54
@amezin
Copy link
Collaborator Author

amezin commented Dec 20, 2022

While this solves #855, it's an ugly workaround IMO.

The more I look at the scheduling problem, the more I think it should be solved using work stealing https://en.wikipedia.org/wiki/Work_stealing. Described in detail in #858

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Thanks @amezin!

Please take a look at my comments. 👍

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Thanks @amezin!

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.

New LoadScheduling batch distribution logic doesn't work for long-running tests Make load scheduler configurable

2 participants