Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions cardano_node_tests/cluster_management/cluster_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion cardano_node_tests/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)

Expand Down
Loading