mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-22 01:20:39 +00:00
In conftest.py we have several fixtures creating shared tables which many test files can share, so they are marked with the "session" scope - all the tests in the testing session may share the same instance. This is fine. Some of test files have additional fixtures for creating special tables needed only in those files. Those were also, unnecessarily, marked "session" scope as well. This means that these temporary tables are only deleted at the very end of test suite, event though they can be deleted at the end of the test file which needed them. This is exactly what the "module" fixture scope is, so this patch changes all the fixtures private to one test file to be "module". After this patch, the teardown of the last test in the suite goes down from 4 seconds to just 1.5 seconds (it's still long because there are still plenty of session-scoped fixtures in conftest.py). Another small benefit is that the peak disk usage of the test suite is lower, because some of the temporary tables are deleted sooner. This patch does not change any test functionality, and also does not make any test faster - it just changes the order of the fixture teardowns. Signed-off-by: Nadav Har'El <nyh@scylladb.com> Message-Id: <20210317175036.1773774-1-nyh@scylladb.com>