In thread executor for testing inside transactions
|Assigned To:||Ivan Necas|
|Target version:||Foreman - Team Ivan Iteration 6|
|Found in release:||Pull request:||https://github.com/theforeman/foreman-tasks/pull/214, https://github.com/theforeman/foreman-tasks/pull/211, https://github.com/Dynflow/dynflow/pull/209|
|Velocity based estimate||-|
In foreman, we heavily depend on db transactions in our test suite, which makes it next to impossible to do continuous transition of some actions to async mode. The plan is to provide an inthread executor for testing, that would perform the task execution in the same thread as the test is running, so that everything runs in the same transaction at the end.
Fixes #17283 - improve caching to test world
Every time somebody asked for InThreadExecutor, new connection was
created, leading to getting out of available connections eventually.