bakaid commented on a change in pull request #612: MINIFICPP-854: Capture RTSP
Frame
URL: https://github.com/apache/nifi-minifi-cpp/pull/612#discussion_r304340809
##########
File path: extensions/opencv/tests/CaptureRTSPFrameTest.cpp
##########
@@ -45,28 +46,39 @@ TEST_CASE("CaptureRTSPFrame", "[opencvtest1]") {
std::shared_ptr<TestPlan> plan = testController.createPlan();
std::shared_ptr<core::Processor> captureRTSP =
plan->addProcessor("CaptureRTSPFrame", "CaptureRTSPFrame");
- plan->setProperty(captureRTSP,
minifi::processors::CaptureRTSPFrame::RTSPUsername.getName(), "admin");
- plan->setProperty(captureRTSP,
minifi::processors::CaptureRTSPFrame::RTSPPassword.getName(), "nope");
- plan->setProperty(captureRTSP,
minifi::processors::CaptureRTSPFrame::RTSPHostname.getName(), "192.168.1.200");
- plan->setProperty(captureRTSP,
minifi::processors::CaptureRTSPFrame::RTSPURI.getName(), "");
+ plan->setProperty(captureRTSP,
minifi::processors::CaptureRTSPFrame::RTSPHostname.getName(), "170.93.143.139");
+ plan->setProperty(captureRTSP,
minifi::processors::CaptureRTSPFrame::RTSPURI.getName(),
"rtplive/470011e600ef003a004ee33696235daa");
plan->setProperty(captureRTSP,
minifi::processors::CaptureRTSPFrame::RTSPPort.getName(), "");
plan->setProperty(captureRTSP,
minifi::processors::CaptureRTSPFrame::ImageEncoding.getName(), ".jpg");
- testController.runSession(plan, false);
- auto records = plan->getProvenanceRecords();
+
+ testController.runSession(plan, true);
std::shared_ptr<core::FlowFile> record = plan->getCurrentFlowFile();
- REQUIRE(record == nullptr);
- REQUIRE(records.size() == 0);
+ REQUIRE(record);
+ REQUIRE(LogTestController::getInstance().contains("A frame is captured"));
+}
+
+TEST_CASE("CaptureRTSPFrame::InvalidURI", "[opencvtest2]") {
+ TestController testController;
+
+
LogTestController::getInstance().setTrace<minifi::processors::CaptureRTSPFrame>();
+ LogTestController::getInstance().setDebug<core::ProcessSession>();
- plan->reset();
- testController.runSession(plan, false);
+ std::shared_ptr<TestPlan> plan = testController.createPlan();
+ std::shared_ptr<core::Processor> captureRTSP =
plan->addProcessor("CaptureRTSPFrame", "CaptureRTSPFrame");
- records = plan->getProvenanceRecords();
- record = plan->getCurrentFlowFile();
- testController.runSession(plan, false);
+ plan->setProperty(captureRTSP,
minifi::processors::CaptureRTSPFrame::RTSPHostname.getName(), "170.93.143.139");
Review comment:
Could you add a comment here with an example command/description how to
start an RTSP server that could be used with this test?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services