You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/07/31 15:39:09 UTC

[GitHub] [ignite] timoninmaxim commented on a change in pull request #8109: Json params support

timoninmaxim commented on a change in pull request #8109:
URL: https://github.com/apache/ignite/pull/8109#discussion_r463674974



##########
File path: modules/ducktests/src/main/java/org/apache/ignite/internal/ducktest/tests/DataGenerationApplication.java
##########
@@ -34,13 +35,13 @@ public DataGenerationApplication(Ignite ignite) {
     }
 
     /** {@inheritDoc} */
-    @Override protected void run(String[] args) {
+    @Override protected void run(Map<String, String> args) {

Review comment:
       Why do you use Map instead of fair JsonNode object? Now you're limited with flat structure and user responsible to cast value types. 

##########
File path: modules/ducktests/tests/ignitetest/services/utils/ignite_aware_app.py
##########
@@ -106,7 +108,23 @@ def env(self):
         return "export MAIN_CLASS={main_class}; ".format(main_class=self.servicejava_class_name) + \
                "export EXCLUDE_TEST_CLASSES=true; " + \
                "export IGNITE_LOG_DIR={log_dir}; ".format(log_dir=self.PERSISTENT_ROOT) + \
-               "export USER_LIBS=%s:/opt/ignite-dev/modules/ducktests/target/*; " % self.user_libs
+               "export USER_LIBS=%s:/opt/ignite-dev/modules/ducktests/target/*%s; " % \

Review comment:
       Looks like user_libs and service_libs should be lists and shouldn't know about colons delimeter. As colon is a part of USER_LIBS, now we have usage of the delimiter in 3 places (user_libs, service_libs, USER_LIBS)
   
   

##########
File path: modules/ducktests/tests/ignitetest/services/utils/ignite_aware_app.py
##########
@@ -106,7 +108,23 @@ def env(self):
         return "export MAIN_CLASS={main_class}; ".format(main_class=self.servicejava_class_name) + \
                "export EXCLUDE_TEST_CLASSES=true; " + \
                "export IGNITE_LOG_DIR={log_dir}; ".format(log_dir=self.PERSISTENT_ROOT) + \
-               "export USER_LIBS=%s:/opt/ignite-dev/modules/ducktests/target/*; " % self.user_libs
+               "export USER_LIBS=%s:/opt/ignite-dev/modules/ducktests/target/*%s; " % \
+               (self.user_libs, self.app_service_libs())
+
+    def app_service_libs(self):
+        """
+        :return: Libs required to start IgniteAwareApplication java implementation.
+        """
+        if self.version.is_dev:
+            return ""
+
+        libs = ""
+
+        for line in self.nodes[0].account.ssh_capture(
+                "ls -d %s/libs/optional/ignite-aws/* | grep jackson | tr '\n' ':' | sed 's/.$//'" % self.path.home()):

Review comment:
       Why do you extract jackson jars from the AWS library? As I can see AWS isn't used in the application

##########
File path: modules/ducktests/tests/ignitetest/services/utils/ignite_aware_app.py
##########
@@ -82,7 +84,7 @@ def app_args(self):
         args = self.java_class_name + "," + IgniteAwareApplicationService.CONFIG_FILE
 
         if self.params != "":
-            args += "," + self.params
+            args += "," + str(base64.b64encode(json.dumps(self.params).encode("UTF-8")))

Review comment:
       Why do you use base64 there? Is it a workaround to avoid escape issue?

##########
File path: modules/ducktests/tests/ignitetest/services/utils/ignite_path.py
##########
@@ -56,3 +56,9 @@ def script(self, script_name):
         :return: absolute path to the specified script
         """
         return os.path.join(self._home, "bin", script_name)
+
+    def home(self):

Review comment:
       just rename _home to home and use it




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