ansible/test/units/plugins
Pilou bbbdc1c25c throttle: fix linear based strategies (#65422)
* 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>
2020-01-24 08:18:08 -06:00
..
action become - stop using play context in more places (#62373) 2019-11-18 05:32:56 +10:00
cache
callback Replace TestCase.assertEquals with TestCase.assertEqual. 2019-11-11 10:24:21 -08:00
cliconf
connection new connection plugin aws_ssm (#49652) 2020-01-11 15:22:01 +10:00
filter Clean up flake8 for ansible.netcommon collection (#65842) 2019-12-16 08:24:38 -05:00
httpapi fix all modules to be able to get parameter with value false (very important fix) (#65040) 2019-11-20 12:09:40 +05:30
inventory Replace TestCase.assertEquals with TestCase.assertEqual. 2019-11-11 10:24:21 -08:00
loader_fixtures
lookup Fix env lookup plugin error on utf8 values (#65541) 2019-12-25 17:24:38 +05:30
shell
strategy throttle: fix linear based strategies (#65422) 2020-01-24 08:18:08 -06:00
terminal Remove empty setUp/tearDown/tearDownClass methods in test classes. 2019-11-06 08:14:29 -08:00
vars
__init__.py
test_plugins.py Remove empty setUp/tearDown/tearDownClass methods in test classes. 2019-11-06 08:14:29 -08:00