Add the collected test items from a node. The collection is stored in the ``.node2collection`` map. Called by the ``DSession.worker_collectionfinish`` hook.
(
self, node: WorkerController, collection: Sequence[str]
)
| 125 | self.node2pending[node] = [] |
| 126 | |
| 127 | def add_node_collection( |
| 128 | self, node: WorkerController, collection: Sequence[str] |
| 129 | ) -> None: |
| 130 | """Add the collected test items from a node. |
| 131 | |
| 132 | The collection is stored in the ``.node2collection`` map. |
| 133 | Called by the ``DSession.worker_collectionfinish`` hook. |
| 134 | """ |
| 135 | assert node in self.node2pending |
| 136 | if self.collection_is_completed: |
| 137 | # A new node has been added later, perhaps an original one died. |
| 138 | # .schedule() should have |
| 139 | # been called by now |
| 140 | assert self.collection |
| 141 | if collection != self.collection: |
| 142 | other_node = next(iter(self.node2collection.keys())) |
| 143 | msg = report_collection_diff( |
| 144 | self.collection, collection, other_node.gateway.id, node.gateway.id |
| 145 | ) |
| 146 | self.log(msg) |
| 147 | return |
| 148 | self.node2collection[node] = list(collection) |
| 149 | |
| 150 | def mark_test_complete( |
| 151 | self, node: WorkerController, item_index: int, duration: float = 0 |