tlasica commented on a change in pull request #115:
URL: https://github.com/apache/cassandra-dtest/pull/115#discussion_r562460898



##########
File path: conftest.py
##########
@@ -602,20 +609,17 @@ def pytest_collection_modifyitems(items, config):
             if deselect_test:
                 logger.info("SKIP: Deselecting non-upgrade test %s because of 
--execute-upgrade-tests-only" % item.name)
 
-        if item.get_closest_marker("resource_intensive") and not collect_only:
-            force_resource_intensive = 
config.getoption("--force-resource-intensive-tests")
-            skip_resource_intensive = 
config.getoption("--skip-resource-intensive-tests")
-            if not force_resource_intensive:
-                if skip_resource_intensive:
-                    deselect_test = True
-                    logger.info("SKIP: Deselecting test %s as test marked 
resource_intensive. To force execution of "
-                          "this test re-run with the 
--force-resource-intensive-tests command line argument" % item.name)
+        if item.get_closest_marker("resource_intensive"):

Review comment:
       this code is so complex that IMO it would be reasonable to add tests in 
`meta_tests` with acceptance criteria validation, so that one does not have to 
reverse engineer the rules.
   
   decision making for single `item` should be extracted to either a class or a 
function so that it can be easily tested without whole configuration burden.
   
   not blocking the fix.




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

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