lordgamez commented on a change in pull request #1082:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1082#discussion_r642564772



##########
File path: extensions/http-curl/tests/HttpGetIntegrationTest.cpp
##########
@@ -63,78 +62,134 @@ class HttpResponder : public CivetHandler {
   }
 };
 
-int main(int argc, char **argv) {
-  using org::apache::nifi::minifi::utils::verifyLogLinePresenceInPollTime;
-  const cmd_args args = parse_cmdline_args(argc, argv);
+class RetryHttpGetResponder : public CivetHandler {
+ public:
+  bool handleGet(CivetServer* /*server*/, struct mg_connection *conn) override 
{
+    puts("handle get with retry");
+    mg_printf(conn, "HTTP/1.1 501 Not Implemented\r\nContent-Type: 
text/plain\r\nContent-Length: 0\r\nConnection: close\r\n\r\n");
+    return true;
+  }
+};
 
-  LogTestController::getInstance().setDebug<core::Processor>();
-  LogTestController::getInstance().setDebug<core::ProcessSession>();
-  LogTestController::getInstance().setDebug<utils::HTTPClient>();
-  
LogTestController::getInstance().setDebug<minifi::controllers::SSLContextService>();
-  LogTestController::getInstance().setDebug<minifi::processors::InvokeHTTP>();
-  
LogTestController::getInstance().setDebug<minifi::processors::LogAttribute>();
+class VerifyHTTPGet {
+ public:
+  VerifyHTTPGet(const cmd_args& args, CivetHandler& http_handler)
+      : args_(args)
+      , configuration_(std::make_shared<minifi::Configure>())
+      , test_repo_(std::make_shared<TestRepository>())
+      , test_flow_repo_(std::make_shared<TestFlowRepository>())
+      , 
content_repo_(std::make_shared<core::repository::VolatileContentRepository>())
+      , 
stream_factory_(minifi::io::StreamFactory::getInstance(configuration_)) {

Review comment:
       You are right, that was just some ad-hoc style I was used to. Fixed it 
in a0f1f41e01915b75f2c3f4ca15162fae9fb587a6




-- 
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:
us...@infra.apache.org


Reply via email to