arpadboda commented on a change in pull request #554: MINIFICPP-842 - CivetWeb 
tests should use random port
URL: https://github.com/apache/nifi-minifi-cpp/pull/554#discussion_r284258358
 
 

 ##########
 File path: extensions/civetweb/processors/ListenHTTP.cpp
 ##########
 @@ -191,6 +211,16 @@ void ListenHTTP::onSchedule(core::ProcessContext 
*context, core::ProcessSessionF
   server_.reset(new CivetServer(options));
   handler_.reset(new Handler(basePath, context, sessionFactory, 
std::move(authDNPattern), std::move(headersAsAttributesPattern)));
   server_->addHandler(basePath, handler_.get());
+
+  if (randomPort) {
+    const auto& vec = server_->getListeningPorts();
+    if (vec.size() != 1) {
+      logger_->log_error("Random port is set, but there is no listening port! 
Server most probably failed to start!");
 
 Review comment:
   There is no such option. 
   The processor currently only supports one port property, which is validated 
using port validator.
   http XOR https depends on whether SSL cert property is provided or not. In 
case it is, the processor automatically switches to https. 
   To make sure I will add a getter for this, too. 
   

----------------------------------------------------------------
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

Reply via email to