Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove duplicated test code from test_dm
The TestDM and TestDMParallel classes were almost identical copies of each other (with the former being the "source" of the latter, since it was the one that existed first), with two main differences: firstly, TestDM has an additional test_run_invalid_shmem_graph test; and secondly, the number of threads they use to start the NMs in their tests is different, with TestDM always using the default (0), and TestDMParallel using the number of available CPUs, with some small alterations. Instead of copying the whole body of the tests, it's better from a maintainability point of view if we avoid this code duplication, and instead reuse the same code for both tests. This commit does exactly that: it creates a NodeManagerTestsBase class with all the common test definitions, and relying on self.nm_threads being defined later on, and then subclass it with TestDM and TestDMParallel, each of which provides its own self.nm_threads definition. In addition, TestDM contains its own additional test. This work is part of YAN-974. Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
- Loading branch information