MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / buildFinalConnection

Method buildFinalConnection

libminifi/test/TestBase.cpp:321–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321std::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
342void TestPlan::finalize() {
343 std::lock_guard<std::recursive_mutex> guard(mutex);

Callers

nothing calls this directly

Calls 8

addRelationshipMethod · 0.80
setSourceMethod · 0.80
setDestinationMethod · 0.80
setSourceUUIDMethod · 0.80
setDestinationUUIDMethod · 0.80
getUUIDStrMethod · 0.45
getUUIDMethod · 0.45
addConnectionMethod · 0.45

Tested by

no test coverage detected