You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/units/plugins
Pilou 783daf9d1b
throttle: fix linear based strategies (#65422) (#66805)
* throttle tests: fix detection of parallel execution

The test wasn't able to detect if too many workers were running.

On my laptop:
- without this change, the 'throttle' target takes ~20 seconds
- with this change, the 'throttle' target takes ~70 seconds
- 1 second isn't long enough to encounter the issue

* Fix throttle test when strategy is 'free' based

'free' strategy allows multiple tasks to be executed in parallel: use
one 'throttledir' per task.

Use 'linear' strategy with a dedicated play for cleanup/setup tasks

* throttle: reset worker idx before queuing a new task

* TestStrategyBase: define task.throttle

otherwise '1' will be used instead of the default value due to the
following expression being equal to '1':

    int(templar.template(task_mock.throttle))

Co-authored-by: James Cammarata <jimi@sngx.net>
(cherry picked from commit bbbdc1c25c)
5 years ago
..
action become - stop using play context in more places (#62373) (#64965) 5 years ago
cache Improve testing of FactCache (#55739) 6 years ago
callback Unit tests: remove unused imports (#59812) 5 years ago
cliconf Unit tests: remove unused imports (#59812) 5 years ago
connection config manager str type vault source (#65023) (#65090) 5 years ago
filter Defer passlib dependency from plugins/filter/network.py (#59304) 5 years ago
httpapi [2.9] Check Point: fix all modules to be able to get parameter with value false (#65110) 5 years ago
inventory [stable-2.9] Account for empty strings when splitting the host pattern (#62442) (#62679) 5 years ago
loader_fixtures Don't cache duplicate plugin names (#34420) 7 years ago
lookup Speed up a few more tests by mocking time.sleep (#61186) 5 years ago
shell Add support for Windows hosts in the SSH connection plugin (#47732) 6 years ago
strategy throttle: fix linear based strategies (#65422) (#66805) 5 years ago
terminal unit tests: remove unused imports (#60462) 5 years ago
vars Add empty-init code-smell script. (#18406) 8 years ago
__init__.py Add empty-init code-smell script. (#18406) 8 years ago
test_plugins.py Unit tests: remove unused imports (#59812) 5 years ago