| 319 | } |
| 320 | |
| 321 | std::shared_ptr<minifi::Connection> TestPlan::buildFinalConnection(std::shared_ptr<core::Processor> processor, bool setDest) { |
| 322 | std::stringstream connection_name; |
| 323 | std::shared_ptr<core::Processor> last = processor; |
| 324 | connection_name << last->getUUIDStr() << "-to-" << processor->getUUIDStr(); |
| 325 | std::shared_ptr<minifi::Connection> connection = std::make_shared<minifi::Connection>(flow_repo_, content_repo_, connection_name.str()); |
| 326 | connection->addRelationship(termination_); |
| 327 | |
| 328 | // link the connections so that we can test results at the end for this |
| 329 | connection->setSource(last); |
| 330 | if (setDest) |
| 331 | connection->setDestination(processor); |
| 332 | |
| 333 | utils::Identifier uuid_copy = last->getUUID(); |
| 334 | connection->setSourceUUID(uuid_copy); |
| 335 | if (setDest) |
| 336 | connection->setDestinationUUID(uuid_copy); |
| 337 | |
| 338 | processor->addConnection(connection); |
| 339 | return connection; |
| 340 | } |
| 341 | |
| 342 | void TestPlan::finalize() { |
| 343 | std::lock_guard<std::recursive_mutex> guard(mutex); |
nothing calls this directly
no test coverage detected