k-rus commented on a change in pull request #152:
URL: https://github.com/apache/cassandra-dtest/pull/152#discussion_r705955561



##########
File path: conftest.py
##########
@@ -605,28 +603,16 @@ 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 were not specified")

Review comment:
       Thank you for catching this!




-- 
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]

Reply via email to