question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Option to set the default distribution algorithm

See original GitHub issue

Hi, I have the following scenario:

  • I have some tests that need to be run in the same worker due to the fact they use a shared object (I know it’s not very idiomatic for unit tests, but it is really the simpler way to check what I need to check)
  • I saw the --dist loadgroup option, but unfortunately it is not the default, so I should remember to specify every time the command line option
  • I can’t add it to the addopts setting since it errors if I don’t specify either -n or -tx, and I want to be able to choose to run the tests the standard way too.

What could work for me is a setting to set the default algorithm to use when --dist is not specified, so that:

  • if I run pytest standalone, it doesn’t run in parallel
  • if I run pytest -n auto, it uses the algorithm specified in the setting
  • if I run pytest -n auto --dist loadfile, it overrides the setting with the loadfile algorithm.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
nicoddemuscommented, Nov 30, 2022
0reactions
DavideCantoncommented, Nov 28, 2022

It can be implemented since we had to do it by using pytest hooks, but it’s quite messy since you have to dig deep inside how the workers read the options

Read more comments on GitHub >

github_iconTop Results From Across the Web

Line Group Configuration - Cisco
The default value is Top Down. For a given distribution algorithm, choose a hunt option for Cisco CallManager to use if a call...
Read more >
Distributed tables design guidance - Azure Synapse Analytics
The best choice depends on several factors, and usually involves tradeoffs. Once a distribution column or column set is chosen, you cannot ...
Read more >
Genetic Algorithm Options - MATLAB & Simulink - MathWorks
'gacreationuniform' creates a random initial population with a uniform distribution. This is the default when there are no linear constraints, or when there...
Read more >
3.5. Setting the Signing Algorithms for Certificates
3.5.1. Setting the CA's Default Signing Algorithm ... Open the CA console. ... In the General Settings tab, set the algorithm to use...
Read more >
Load Balancing Algorithms, Types and Techniques - Kemp
Round-robin load balancing is the simplest and most commonly-used load balancing algorithm. Client requests are distributed to application servers in simple ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found