adelapena commented on a change in pull request #152:
URL: https://github.com/apache/cassandra-dtest/pull/152#discussion_r702065709
##########
File path: conftest.py
##########
@@ -605,28 +597,17 @@ def pytest_collection_modifyitems(items, config):
selected_items = []
deselected_items = []
- can_run_resource_intensive_tests =
dtest_config.force_execution_of_resource_intensive_tests or
sufficient_system_resources_for_resource_intensive_tests()
- if not can_run_resource_intensive_tests:
- logger.info("Resource intensive tests will be skipped because there is
not enough system resource "
- "and --force-resource-intensive-tests was not specified")
+ sufficient_resources =
sufficient_system_resources_for_resource_intensive_tests()
+ skip_conditions = SkipConditions(dtest_config, sufficient_resources)
- include_upgrade_tests = dtest_config.execute_upgrade_tests or
dtest_config.execute_upgrade_tests_only
- include_non_upgrade_tests = not dtest_config.execute_upgrade_tests_only
- include_resource_intensive_tests = can_run_resource_intensive_tests and
not dtest_config.skip_resource_intensive_tests
- include_non_resource_intensive_tests = not
dtest_config.only_resource_intensive_tests
- include_vnodes_tests = dtest_config.use_vnodes
- include_no_vnodes_tests = not dtest_config.use_vnodes
- include_no_offheap_memtables_tests = not
dtest_config.use_off_heap_memtables
+ if skip_conditions.skip_resource_intensive_tests:
+ logger.info("Resource intensive tests will be skipped because "
+ "it was requested to skip or there is not enough system
resource "
+ "and --force-resource-intensive-tests or
--only-resource-intensive-tests "
+ "were not specified")
Review comment:
I don't see why skipping resource intensive tests with not enough
resources and `--only-resource-intensive-tests` is wrong. IMO it makes sense to
require the `--force-resource-intensive-tests` in that case, since one flag
controls the selection and the other one skips the resource check. Let's see
what the second reviewer thinks about this. In any case if we are going the
behaviour of the flags or we find them confusing we should probably extend
their descriptions in `pytest_addoption` and `run_dtests.py`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]