This is an automated email from the ASF dual-hosted git repository.

hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hop.git


The following commit(s) were added to refs/heads/master by this push:
     new 56405ab  HOP-3402 Fixed integration tests
     new a2d6796  Merge pull request #1204 from sramazzina/master
56405ab is described below

commit 56405abb49a0560b91ad9a7bd22f45cb8d5d0a00
Author: Sergio Ramazzina <[email protected]>
AuthorDate: Tue Nov 30 16:50:43 2021 +0100

    HOP-3402 Fixed integration tests
---
 .../database/0019-execute-sqlscript-basic.hpl      | 19 +++---
 .../database/0019-execute-sqlscript-byeachrow.hpl  | 20 +++---
 .../database/main-0019-execute-sqlscript.hwf       | 74 ++++++++++++++++++++--
 3 files changed, 89 insertions(+), 24 deletions(-)

diff --git a/integration-tests/database/0019-execute-sqlscript-basic.hpl 
b/integration-tests/database/0019-execute-sqlscript-basic.hpl
index 0d25a8d..65fedb3 100644
--- a/integration-tests/database/0019-execute-sqlscript-basic.hpl
+++ b/integration-tests/database/0019-execute-sqlscript-basic.hpl
@@ -68,22 +68,23 @@ limitations under the License.
       <method>none</method>
       <schema_name/>
     </partitioning>
-    <arguments>
-</arguments>
     <connection>unit-test-db</connection>
-    <delete_field>deleted</delete_field>
     <execute_each_row>N</execute_each_row>
-    <insert_field>inserted</insert_field>
-    <set_params>N</set_params>
-    <quoteString>N</quoteString>
-    <read_field>read</read_field>
-    <replace_variables>N</replace_variables>
     <single_statement>N</single_statement>
-    <sql>delete from public.testtable;
+    <replace_variables>N</replace_variables>
+    <quoteString>N</quoteString>
+    <sql>
 insert into public.testtable (key, value) values ('key1', 'value1');
 insert into public.testtable (key, value) values ('key2', 'value2');
+
 delete from public.testtable;</sql>
+    <set_params>N</set_params>
+    <insert_field>inserted</insert_field>
     <update_field>updated</update_field>
+    <delete_field>deleted</delete_field>
+    <read_field>read</read_field>
+    <arguments>
+    </arguments>
     <attributes/>
     <GUI>
       <xloc>320</xloc>
diff --git a/integration-tests/database/0019-execute-sqlscript-byeachrow.hpl 
b/integration-tests/database/0019-execute-sqlscript-byeachrow.hpl
index 7473c07..ee8d335 100644
--- a/integration-tests/database/0019-execute-sqlscript-byeachrow.hpl
+++ b/integration-tests/database/0019-execute-sqlscript-byeachrow.hpl
@@ -73,22 +73,24 @@ limitations under the License.
       <method>none</method>
       <schema_name/>
     </partitioning>
-    <arguments>
-      <argument>value</argument>
-    </arguments>
     <connection>unit-test-db</connection>
-    <delete_field>deleted</delete_field>
     <execute_each_row>Y</execute_each_row>
-    <insert_field>inserted</insert_field>
-    <set_params>Y</set_params>
-    <quoteString>N</quoteString>
-    <read_field>read</read_field>
-    <replace_variables>N</replace_variables>
     <single_statement>N</single_statement>
+    <replace_variables>N</replace_variables>
+    <quoteString>N</quoteString>
     <sql>insert into public.testtable (key, value) values ('key1', ?);
 insert into public.testtable (key, value) values ('key2', ?);
 delete from public.testtable where value=?;</sql>
+    <set_params>Y</set_params>
+    <insert_field>inserted</insert_field>
     <update_field>updated</update_field>
+    <delete_field>deleted</delete_field>
+    <read_field>read</read_field>
+    <arguments>
+      <argument>
+        <name>value</name>
+      </argument>
+    </arguments>
     <attributes/>
     <GUI>
       <xloc>384</xloc>
diff --git a/integration-tests/database/main-0019-execute-sqlscript.hwf 
b/integration-tests/database/main-0019-execute-sqlscript.hwf
index 632fc6a..8f5f4aa 100644
--- a/integration-tests/database/main-0019-execute-sqlscript.hwf
+++ b/integration-tests/database/main-0019-execute-sqlscript.hwf
@@ -72,7 +72,7 @@ limitations under the License.
         <pass_all_parameters>Y</pass_all_parameters>
       </parameters>
       <parallel>N</parallel>
-      <xloc>240</xloc>
+      <xloc>368</xloc>
       <yloc>48</yloc>
       <attributes_hac/>
     </action>
@@ -100,25 +100,87 @@ limitations under the License.
         <pass_all_parameters>Y</pass_all_parameters>
       </parameters>
       <parallel>N</parallel>
-      <xloc>416</xloc>
+      <xloc>768</xloc>
+      <yloc>48</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>Prepare Test 2</name>
+      <description/>
+      <type>SQL</type>
+      <attributes/>
+      <sql>
+DROP TABLE IF EXISTS public.testtable;
+
+CREATE TABLE public.testtable
+(
+    "key" varchar NULL,
+    value varchar NULL
+);
+</sql>
+      <useVariableSubstitution>F</useVariableSubstitution>
+      <sqlfromfile>F</sqlfromfile>
+      <sqlfilename/>
+      <sendOneStatement>T</sendOneStatement>
+      <connection>unit-test-db</connection>
+      <parallel>N</parallel>
+      <xloc>528</xloc>
+      <yloc>48</yloc>
+      <attributes_hac/>
+    </action>
+    <action>
+      <name>Prepare Test 1</name>
+      <description/>
+      <type>SQL</type>
+      <attributes/>
+      <sql>
+DROP TABLE IF EXISTS public.testtable;
+
+CREATE TABLE public.testtable
+(
+    "key" varchar NULL,
+    value varchar NULL
+);
+</sql>
+      <useVariableSubstitution>F</useVariableSubstitution>
+      <sqlfromfile>F</sqlfromfile>
+      <sqlfilename/>
+      <sendOneStatement>T</sendOneStatement>
+      <connection>unit-test-db</connection>
+      <parallel>N</parallel>
+      <xloc>224</xloc>
       <yloc>48</yloc>
       <attributes_hac/>
     </action>
   </actions>
   <hops>
     <hop>
-      <from>Start</from>
-      <to>0019-execute-sql-basic</to>
+      <from>0019-execute-sql-basic</from>
+      <to>Prepare Test 2</to>
       <enabled>Y</enabled>
       <evaluation>Y</evaluation>
       <unconditional>Y</unconditional>
     </hop>
     <hop>
-      <from>0019-execute-sql-basic</from>
+      <from>Prepare Test 2</from>
       <to>0019-execute-sqlscript-byeachrow</to>
       <enabled>Y</enabled>
       <evaluation>Y</evaluation>
-      <unconditional>N</unconditional>
+      <unconditional>Y</unconditional>
+    </hop>
+    <hop>
+      <from>Start</from>
+      <to>Prepare Test 1</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
+    </hop>
+    <hop>
+      <from>Prepare Test 1</from>
+      <to>0019-execute-sql-basic</to>
+      <enabled>Y</enabled>
+      <evaluation>Y</evaluation>
+      <unconditional>Y</unconditional>
     </hop>
   </hops>
   <notepads>

Reply via email to