Skip to content

Commit 45a3b5e

Browse files
committed
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.
1 parent cd49aae commit 45a3b5e

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

cardano_node_tests/cluster_management/cluster_management.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@
55
by multiple test workers.
66
77
Key concepts:
8-
- **Pool of Instances**: Multiple cluster instances can be running concurrently. Each test worker
9-
requests a cluster instance to run a test on.
10-
- **Coordination via File System**: Workers communicate and coordinate through a system of status
11-
files created on a shared file system. These files act as locks and signals to indicate the
12-
state of cluster instances (e.g., which test is running, if a respin is needed, which
13-
resources are locked). The `status_files` module manages the creation and lookup of these
14-
files.
15-
- **Resource Management**: Tests can declare what resources they need. A resource can be, for
16-
example, a specific feature of a cluster that cannot be used by multiple tests at the same
17-
time. The `ClusterManager` handles locking of these resources so that only one test can use
18-
them at a time.
19-
- **Cluster Respin**: Some tests can modify the state of a cluster in a way that it cannot be
20-
used by subsequent tests. These tests can request a "respin" of the cluster instance, which
21-
re-initializes it to a clean state.
22-
- **`ClusterManager`**: This is the main class that test fixtures interact with. Its `get()`
23-
method is used to acquire a suitable cluster instance for a test, taking into account available
24-
instances, resource requirements, and scheduling priority.
8+
- **Pool of Instances**: Multiple cluster instances can be running concurrently. Each test worker
9+
requests a cluster instance to run a test on.
10+
- **Coordination via File System**: Workers communicate and coordinate through a system of status
11+
files created on a shared file system. These files act as locks and signals to indicate the
12+
state of cluster instances (e.g., which test is running, if a respin is needed, which
13+
resources are locked). The `status_files` module manages the creation and lookup of these
14+
files.
15+
- **Resource Management**: Tests can declare what resources they need. A resource can be, for
16+
example, a specific feature of a cluster that cannot be used by multiple tests at the same
17+
time. The `ClusterManager` handles locking of these resources so that only one test can use
18+
them at a time.
19+
- **Cluster Respin**: Some tests can modify the state of a cluster in a way that it cannot be
20+
used by subsequent tests. These tests can request a "respin" of the cluster instance, which
21+
re-initializes it to a clean state.
22+
- **`ClusterManager`**: This is the main class that test fixtures interact with. Its `get()`
23+
method is used to acquire a suitable cluster instance for a test, taking into account available
24+
instances, resource requirements, and scheduling priority.
2525
2626
This system allows for efficient parallel execution of tests that require a running Cardano
2727
cluster, by reusing cluster instances and managing contention for shared resources.

cardano_node_tests/tests/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
)
4444

4545
SKIPIF_BUILD_EST_1199 = pytest.mark.skipif(
46-
issues.cli_1199.is_blocked(),
46+
True, # We don't want to execute `issues.cli_1199.is_blocked()` during import time
4747
reason="`build-estimate` fails to balance tx with no txouts",
4848
)
4949

0 commit comments

Comments
 (0)