phrocker 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_r284241152
##########
File path: extensions/civetweb/processors/ListenHTTP.cpp
##########
@@ -27,11 +27,22 @@ namespace minifi {
namespace processors {
core::Property ListenHTTP::BasePath(
- core::PropertyBuilder::createProperty("Base Path")->withDescription("Base
path for incoming
connections")->isRequired(false)->withDefaultValue<std::string>("contentListener")->build());
+ core::PropertyBuilder::createProperty("Base Path")->
+ withDescription("Base path for incoming connections")->
+ isRequired(false)->
+ withDefaultValue<std::string>("contentListener")->build());
core::Property ListenHTTP::Port(
- core::PropertyBuilder::createProperty("Listening
Port")->withDescription("The Port to listen on for incoming
connections")->isRequired(true)->withDefaultValue<int>(
- 80, core::StandardValidators::PORT_VALIDATOR())->build());
+ core::PropertyBuilder::createProperty("Listening Port")->
+ withDescription("The Port to listen on for incoming connections")->
+ isRequired(true)->
+ withDefaultValue<int>(80,
core::StandardValidators::PORT_VALIDATOR())->build());
+
+core::Property ListenHTTP::RandomPort(
+ core::PropertyBuilder::createProperty("Random Port")->
+ withDescription("Choose random port to listen - for testing purposes
only!")->
Review comment:
I don't think we should have testing code available to production
environments. This will be relayed through the C2 framework. Perhaps
eliminating it when not building tests will work.
----------------------------------------------------------------
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