ansible/test/units
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
..
cli Fix using a URL for galaxy collection install (#65272) 2019-12-03 04:55:31 +10:00
compat
config config manager str type vault source (#65023) 2019-11-20 12:02:28 +10:00
contrib
errors Remove empty overridden unittest.setUp and unittest.tearDown methods. 2019-11-05 09:12:11 -08:00
executor Fix network action plugin load in collection (#65849) 2019-12-16 19:15:41 +05:30
galaxy Rename private function (#66577) 2020-01-17 15:27:15 -05:00
inventory_test_data/group_vars
mock Replace TestCase.assertEquals with TestCase.assertEqual. 2019-11-11 10:24:21 -08:00
module_utils synchronize - fix password authentication (#66542) 2020-01-21 10:43:56 -05:00
modules pamd: Fix AttributeError when removing the first or last rule (#66398) 2020-01-23 14:08:42 -05:00
parsing Replace TestCase.assertEquals with TestCase.assertEqual. 2019-11-11 10:24:21 -08:00
playbook Check if task file is specified for import_tasks (#57572) 2019-12-24 10:26:32 +05:30
plugins throttle: fix linear based strategies (#65422) 2020-01-24 08:18:08 -06:00
regex Add toggle to control invalid character substitution in group names (#52748) 2019-03-06 11:49:40 -05:00
template Do not treat AnsibleUndefined as being unsafe (#65202) 2019-11-25 15:06:29 +01:00
utils Ensure that data within a tuple is marked as unsafe (#65918) 2020-01-07 08:41:37 -06:00
vars Remove empty setUp/tearDown/tearDownClass methods in test classes. 2019-11-06 08:14:29 -08:00
__init__.py
requirements.txt Fix ansible-test collections requirements installation. (#62181) 2019-09-12 02:00:33 -07:00
test_constants.py
test_context.py Unit tests: remove unused imports (#59740) 2019-07-29 22:10:13 +02:00