You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/08/11 11:19:30 UTC

[GitHub] [nifi-minifi-cpp] martinzink commented on a diff in pull request #1383: MINIFICPP-1875 HTTPClient should be reusable

martinzink commented on code in PR #1383:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1383#discussion_r943369313


##########
docker/test/integration/MiNiFi_integration_test_driver.py:
##########
@@ -132,7 +132,9 @@ def generate_input_port_for_remote_process_group(remote_process_group, name):
         input_port_node.set_uuid(uuid.uuid3(remote_process_group.get_uuid(), "input_port"))
         return input_port_node
 
-    def add_test_data(self, path, test_data, file_name=str(uuid.uuid4())):
+    def add_test_data(self, path, test_data, file_name=None):
+        if file_name is None:
+            file_name = str(uuid.uuid4())

Review Comment:
   It turns out in Python the default argument expression isn't evaluated when you call the function, it's evaluated when you create the function. (i.e. once)
   Before this change the random file_name was the same every-time you called the function



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

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org