Closed myxie closed 2 weeks ago
This pull request adds an integration test for multiple nodes and a partitioned graph. It involves significant refactoring of test utilities, moving common test code into shared modules, and updating import statements across multiple files. The changes aim to improve test coverage for configurable ports and multi-node deployments.
sequenceDiagram
participant Test as Test Suite
participant DM1 as NodeManager 1
participant DM2 as NodeManager 2
participant DIM as DataIslandManager
Test->>DM1: createSession(sessionId)
Test->>DM1: addGraphSpec(sessionId, g1)
Test->>DM1: add_node_subscriptions(sessionId, {nm_conninfo(1): rels})
Test->>DM1: deploySession(sessionId)
Test->>DM2: createSession(sessionId)
Test->>DM2: addGraphSpec(sessionId, g2)
Test->>DM2: add_node_subscriptions(sessionId, {nm_conninfo(0): rels})
Test->>DM2: deploySession(sessionId)
Test->>DIM: createSession("TestSession")
Test->>DIM: addGraphSpec("TestSession", pg_spec)
Test->>DIM: deploySession("TestSession", completedDrops=roots)
DIM-->>Test: getGraphStatus("TestSession")
classDiagram
class DROPManagerUtils {
+nm_conninfo(n, return_tuple)
+add_test_reprodata(graph)
+quickDeploy(nm, sessionId, graphSpec, node_subscriptions)
}
class NMTestsMixIn {
-_dms: dict
-use_processes: bool
+_start_dm(threads, kwargs)
+tearDown()
+host_names: list
+start_hosts(num_hosts, threads)
+_test_runGraphInTwoNMs(g1, g2, rels, root_data, leaf_data, root_oids, leaf_oid, expected_failures, sessionId, node_managers, threads)
}
DROPManagerUtils <|-- NMTestsMixIn
NMTestsMixIn o-- NodeManager
NMTestsMixIn o-- DROPManagerUtils
Change | Details | Files |
---|---|---|
Added a new integration test for multiple nodes and a partitioned graph |
|
daliuge-engine/test/deploy/test_graph_to_manager.py |
Refactored test utilities and constants into separate modules |
|
daliuge-engine/test/dlg_engine_testutils.py daliuge-engine/test/dlg_engine_testconstants.py |
Updated import statements and removed duplicate code across multiple test files |
|
daliuge-engine/test/manager/test_dm.py daliuge-engine/test/manager/test_dim.py daliuge-engine/test/manager/test_rest.py daliuge-engine/test/manager/test_scalability.py daliuge-engine/test/deploy/test_common.py daliuge-engine/test/test_logs.py daliuge-engine/test/apps/test_dynlib.py daliuge-engine/test/apps/test_pyfunc.py daliuge-engine/test/apps/test_dynlib2.py |
Modified existing manager and utility classes to support the new test structure |
|
daliuge-engine/dlg/testutils.py daliuge-engine/dlg/manager/composite_manager.py daliuge-engine/dlg/manager/rest.py |
Added a pull request template |
|
.github/pull_request_template.md |
@awicenec this PR adds the unit tests we discussed a few months ago (higher priority work came up in between). I believe there's no major changes to the actual features of this PR, just the test infrastructure.
JIRA Ticket
Note: This needs to wait until #283 is merged before this can be merged.
LIU-396
Type
Problem/Issue
We have recently had issues running on Setonix, which were caused by some port issues that weren't properly tested. The tests currently have two node managers running, but we don't test the complete graph-submissiong through to deployment in the unit tests.
Solution
This test loads a graph, partitions it, and then deploys it to two different Node Managers, each running on different ports. This serves to test both the new configurable ports, as well as ensures we have test coverage for # Checklist - [X] Unittests added - ~[ ] Documentation added~ - Will be addressed in follow-up PR [LIU-396]: https://icrar.atlassian.net/browse/LIU-396?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ ## Summary by Sourcery Add an integration test to verify the deployment of a partitioned graph across multiple node managers, addressing recent issues with port configurations. Refactor test utilities to improve code reuse and maintainability. New Features: - Introduce integration test for deploying a partitioned graph across multiple node managers. Enhancements: - Refactor test utilities by consolidating common functions into a new module, improving code reuse and maintainability. Tests: - Add a new integration test to verify the deployment of a partitioned graph across multiple node managers, ensuring proper functionality of configurable ports.