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

Method addConnection

libminifi/test/TestBase.cpp:162–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162std::shared_ptr<minifi::Connection> TestPlan::addConnection(const std::shared_ptr<core::Processor>& source_proc, const core::Relationship& source_relationship, const std::shared_ptr<core::Processor>& destination_proc) {
163 std::stringstream connection_name;
164 connection_name << source_proc->getUUIDStr() << "-to-" << destination_proc->getUUIDStr();
165 std::shared_ptr<minifi::Connection> connection = std::make_shared<minifi::Connection>(flow_repo_, content_repo_, connection_name.str());
166
167 connection->addRelationship(source_relationship);
168
169 // link the connections so that we can test results at the end for this
170 connection->setSource(source_proc);
171 connection->setDestination(destination_proc);
172
173 connection->setSourceUUID(source_proc->getUUID());
174 connection->setDestinationUUID(destination_proc->getUUID());
175 source_proc->addConnection(connection);
176 if (source_proc != destination_proc) {
177 destination_proc->addConnection(connection);
178 }
179 relationships_.push_back(connection);
180 return connection;
181}
182
183std::shared_ptr<core::controller::ControllerServiceNode> TestPlan::addController(const std::string &controller_name, const std::string &name) {
184 if (finalized) {

Callers 15

connectProcessorsMethod · 0.45
addProcessorMethod · 0.45
buildFinalConnectionMethod · 0.45
TestFlowMethod · 0.45
setupFlowMethod · 0.45
MergeTestControllerMethod · 0.45
C2MetricsTests.cppFile · 0.45
SessionTests.cppFile · 0.45
RepoTests.cppFile · 0.45
mainFunction · 0.45

Calls 7

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

Tested by

no test coverage detected