This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/main by this push:
new 90bc4b8e74 [IT] fix test and small issue in CheckDBConnection (#6828)
90bc4b8e74 is described below
commit 90bc4b8e74c9ed35c414d5a7e978806c4794a054
Author: Hans Van Akelyen <[email protected]>
AuthorDate: Thu Mar 19 09:53:39 2026 +0100
[IT] fix test and small issue in CheckDBConnection (#6828)
revert
---
integration-tests/database/0037-ddl.hpl | 5 ++---
integration-tests/database/datasets/golden-ddl.csv | 4 ++--
integration-tests/database/main-0037-ddl.hwf | 2 +-
.../actions/checkdbconnection/ActionCheckDbConnections.java | 8 +++++++-
4 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/integration-tests/database/0037-ddl.hpl
b/integration-tests/database/0037-ddl.hpl
index 59dbf73c6c..5f6c513e03 100644
--- a/integration-tests/database/0037-ddl.hpl
+++ b/integration-tests/database/0037-ddl.hpl
@@ -77,7 +77,7 @@ limitations under the License.
<method>none</method>
<schema_name/>
</partitioning>
- <connection>h2-db</connection>
+ <connection>unit-test-db</connection>
<ddlOutputField>ddl</ddlOutputField>
<droppingTable>Y</droppingTable>
<executingDdl>Y</executingDdl>
@@ -85,7 +85,6 @@ limitations under the License.
<fieldNameField>name</fieldNameField>
<fieldPrecisionField>precision</fieldPrecisionField>
<fieldTypeField>hopType</fieldTypeField>
- <schemaName/>
<tableName>DDLTEST</tableName>
<attributes/>
<GUI>
@@ -112,7 +111,7 @@ limitations under the License.
<item>0</item>
</line>
<line>
- <item>name</item>
+ <item>namefield</item>
<item>String</item>
<item>100</item>
<item>-1</item>
diff --git a/integration-tests/database/datasets/golden-ddl.csv
b/integration-tests/database/datasets/golden-ddl.csv
index 54ae2dfcbc..126bd97b88 100644
--- a/integration-tests/database/datasets/golden-ddl.csv
+++ b/integration-tests/database/datasets/golden-ddl.csv
@@ -1,7 +1,7 @@
ddl
"CREATE TABLE DDLTEST
(
- id INT
-, name VARCHAR(100)
+ id INTEGER
+, namefield VARCHAR(100)
)
;"
diff --git a/integration-tests/database/main-0037-ddl.hwf
b/integration-tests/database/main-0037-ddl.hwf
index 48336ecfd9..1df820cd53 100644
--- a/integration-tests/database/main-0037-ddl.hwf
+++ b/integration-tests/database/main-0037-ddl.hwf
@@ -69,7 +69,7 @@ limitations under the License.
<description/>
<type>TABLE_EXISTS</type>
<attributes/>
- <connection>h2-db</connection>
+ <connection>unit-test-db</connection>
<schemaname/>
<tablename>DDLTEST</tablename>
<parallel>N</parallel>
diff --git
a/plugins/actions/checkdbconnection/src/main/java/org/apache/hop/workflow/actions/checkdbconnection/ActionCheckDbConnections.java
b/plugins/actions/checkdbconnection/src/main/java/org/apache/hop/workflow/actions/checkdbconnection/ActionCheckDbConnections.java
index a442957fce..5fc7916fbd 100644
---
a/plugins/actions/checkdbconnection/src/main/java/org/apache/hop/workflow/actions/checkdbconnection/ActionCheckDbConnections.java
+++
b/plugins/actions/checkdbconnection/src/main/java/org/apache/hop/workflow/actions/checkdbconnection/ActionCheckDbConnections.java
@@ -75,7 +75,10 @@ public class ActionCheckDbConnections extends ActionBase
implements Cloneable, I
public ActionCheckDbConnections(ActionCheckDbConnections other) {
super(other.getName(), other.getDescription(), other.getPluginId());
- other.getConnections().forEach(c -> connections.add(new CDConnection(c)));
+ connections = new ArrayList<>();
+ if (other.getConnections() != null) {
+ other.getConnections().forEach(c -> connections.add(new
CDConnection(c)));
+ }
}
@Override
@@ -227,6 +230,9 @@ public class ActionCheckDbConnections extends ActionBase
implements Cloneable, I
IVariables variables, WorkflowMeta workflowMeta) {
List<ResourceReference> references =
super.getResourceDependencies(variables, workflowMeta);
+ if (connections == null) {
+ return references;
+ }
for (CDConnection connection : connections) {
DatabaseMeta databaseMeta =
loadDatabaseMeta(resolve(connection.getName()));
if (databaseMeta != null) {