Describe the bug
After merging #174 running the tests/db_tests/test_api.py::test_mount_device__success test does not produce consistent results. When running the tests with the -n 1 parameter the tests fail, the tests suceed when running with -n 2 or an higher number of threads.
To Reproduce
Steps to reproduce the behavior:
start docker container with ./run_docker.sh
Start test with pytest tests/db_tests/test_api.py -n 2 --no-header -v
see All tests succeed
start tests with pytest tests/db_tests/test_api.py -n 1 --no-header -v
See the tests/db_tests/test_api.py::test_mount_device__success test fail
Aditionall context
The problem is two-fold:
The code intruduced with #174 was not tested correctly, so I changed the test to account for the new _find_device_type function. You can find the PR for this in #176. I consider this fixed with that PR.
The real problem is that this issue was not identified by the automatic tests. I have no clue why. A solution would be running the tests with 1 thread and with multiple threads, but that would still be an workaround imho.
Describe the bug After merging #174 running the
tests/db_tests/test_api.py::test_mount_device__success
test does not produce consistent results. When running the tests with the-n 1
parameter the tests fail, the tests suceed when running with-n 2
or an higher number of threads.To Reproduce Steps to reproduce the behavior:
./run_docker.sh
pytest tests/db_tests/test_api.py -n 2 --no-header -v
pytest tests/db_tests/test_api.py -n 1 --no-header -v
tests/db_tests/test_api.py::test_mount_device__success
test failAditionall context The problem is two-fold:
_find_device_type
function. You can find the PR for this in #176. I consider this fixed with that PR.