From 45a3b5ec0c00eadd617b627e51d49370d2f02eaf Mon Sep 17 00:00:00 2001 From: Martin Kourim Date: Fri, 14 Nov 2025 14:44:05 +0100 Subject: [PATCH] fix(doc): improve doc formatting and skipif usage Refactor the docstring in cluster_management.py to use consistent indentation for key concepts. Update SKIPIF_BUILD_EST_1199 in tests/common.py to avoid executing issues.cli_1199.is_blocked() at import time, preventing unwanted side effects during test collection. --- .../cluster_management/cluster_management.py | 34 +++++++++---------- cardano_node_tests/tests/common.py | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cardano_node_tests/cluster_management/cluster_management.py b/cardano_node_tests/cluster_management/cluster_management.py index bbe9cd1b7..fdb1c37a4 100644 --- a/cardano_node_tests/cluster_management/cluster_management.py +++ b/cardano_node_tests/cluster_management/cluster_management.py @@ -5,23 +5,23 @@ by multiple test workers. Key concepts: -- **Pool of Instances**: Multiple cluster instances can be running concurrently. Each test worker - requests a cluster instance to run a test on. -- **Coordination via File System**: Workers communicate and coordinate through a system of status - files created on a shared file system. These files act as locks and signals to indicate the - state of cluster instances (e.g., which test is running, if a respin is needed, which - resources are locked). The `status_files` module manages the creation and lookup of these - files. -- **Resource Management**: Tests can declare what resources they need. A resource can be, for - example, a specific feature of a cluster that cannot be used by multiple tests at the same - time. The `ClusterManager` handles locking of these resources so that only one test can use - them at a time. -- **Cluster Respin**: Some tests can modify the state of a cluster in a way that it cannot be - used by subsequent tests. These tests can request a "respin" of the cluster instance, which - re-initializes it to a clean state. -- **`ClusterManager`**: This is the main class that test fixtures interact with. Its `get()` - method is used to acquire a suitable cluster instance for a test, taking into account available - instances, resource requirements, and scheduling priority. + - **Pool of Instances**: Multiple cluster instances can be running concurrently. Each test worker + requests a cluster instance to run a test on. + - **Coordination via File System**: Workers communicate and coordinate through a system of status + files created on a shared file system. These files act as locks and signals to indicate the + state of cluster instances (e.g., which test is running, if a respin is needed, which + resources are locked). The `status_files` module manages the creation and lookup of these + files. + - **Resource Management**: Tests can declare what resources they need. A resource can be, for + example, a specific feature of a cluster that cannot be used by multiple tests at the same + time. The `ClusterManager` handles locking of these resources so that only one test can use + them at a time. + - **Cluster Respin**: Some tests can modify the state of a cluster in a way that it cannot be + used by subsequent tests. These tests can request a "respin" of the cluster instance, which + re-initializes it to a clean state. + - **`ClusterManager`**: This is the main class that test fixtures interact with. Its `get()` + method is used to acquire a suitable cluster instance for a test, taking into account available + instances, resource requirements, and scheduling priority. This system allows for efficient parallel execution of tests that require a running Cardano cluster, by reusing cluster instances and managing contention for shared resources. diff --git a/cardano_node_tests/tests/common.py b/cardano_node_tests/tests/common.py index cf3713634..3b415efd3 100644 --- a/cardano_node_tests/tests/common.py +++ b/cardano_node_tests/tests/common.py @@ -43,7 +43,7 @@ ) SKIPIF_BUILD_EST_1199 = pytest.mark.skipif( - issues.cli_1199.is_blocked(), + True, # We don't want to execute `issues.cli_1199.is_blocked()` during import time reason="`build-estimate` fails to balance tx with no txouts", )