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 fd0b643f85 Fix workflow action check() to read the real bean 
properties (#9085)
fd0b643f85 is described below

commit fd0b643f8516f6bbc629a9d0e67a173b7c67bf6d
Author: Lance <[email protected]>
AuthorDate: Thu Oct 22 20:46:37 2026 +0800

    Fix workflow action check() to read the real bean properties (#9085)
    
    Signed-off-by: leehaut <[email protected]>
---
 .../hop/workflow/actions/http/ActionHttp.java      |  2 +-
 .../hop/workflow/actions/http/ActionHttpTest.java  | 37 ++++++++++++
 .../workflow/actions/pipeline/ActionPipeline.java  | 27 ++-------
 .../actions/pipeline/ActionPipelineCheckTest.java  | 60 ++++++++++++++++++++
 .../apache/hop/workflow/actions/xml/xslt/Xslt.java |  6 +-
 .../workflow/actions/xml/xslt/XsltCheckTest.java   | 66 ++++++++++++++++++++++
 .../actions/mssqlbulkload/ActionMssqlBulkLoad.java |  4 +-
 .../ActionMssqlBulkLoadCheckTest.java              | 64 +++++++++++++++++++++
 .../actions/mysqlbulkfile/ActionMysqlBulkFile.java |  4 +-
 .../actions/mysqlbulkload/ActionMysqlBulkLoad.java |  4 +-
 .../ActionMysqlBulkFileBlankFieldsTest.java        | 25 ++++++++
 .../ActionMysqlBulkLoadBlankFieldsTest.java        | 26 +++++++++
 .../mail/workflow/actions/getpop/ActionGetPOP.java |  2 +-
 .../workflow/actions/getpop/ActionGetPOPTest.java  | 22 ++++++++
 14 files changed, 317 insertions(+), 32 deletions(-)

diff --git 
a/plugins/actions/http/src/main/java/org/apache/hop/workflow/actions/http/ActionHttp.java
 
b/plugins/actions/http/src/main/java/org/apache/hop/workflow/actions/http/ActionHttp.java
index 96d2f25976..8564150d40 100644
--- 
a/plugins/actions/http/src/main/java/org/apache/hop/workflow/actions/http/ActionHttp.java
+++ 
b/plugins/actions/http/src/main/java/org/apache/hop/workflow/actions/http/ActionHttp.java
@@ -747,7 +747,7 @@ public class ActionHttp extends ActionBase {
     ActionValidatorUtils.andValidator()
         .validate(
             this,
-            "targetFilenameExtention",
+            "targetFilenameExtension",
             remarks,
             
AndValidator.putValidators(ActionValidatorUtils.notBlankValidator()));
     ActionValidatorUtils.andValidator()
diff --git 
a/plugins/actions/http/src/test/java/org/apache/hop/workflow/actions/http/ActionHttpTest.java
 
b/plugins/actions/http/src/test/java/org/apache/hop/workflow/actions/http/ActionHttpTest.java
index 992980baf8..bf18a29cab 100644
--- 
a/plugins/actions/http/src/test/java/org/apache/hop/workflow/actions/http/ActionHttpTest.java
+++ 
b/plugins/actions/http/src/test/java/org/apache/hop/workflow/actions/http/ActionHttpTest.java
@@ -17,9 +17,13 @@
 package org.apache.hop.workflow.actions.http;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.List;
 import org.apache.hop.core.Const;
+import org.apache.hop.core.ICheckResult;
 import org.apache.hop.core.encryption.Encr;
 import org.apache.hop.core.encryption.TwoWayPasswordEncoderPluginType;
 import org.apache.hop.core.exception.HopException;
@@ -45,6 +49,39 @@ class ActionHttpTest {
     Encr.init(passwordEncoderPluginID);
   }
 
+  @Test
+  void checkReadsTargetFilenameExtension() {
+    ActionHttp action = new ActionHttp();
+    action.setTargetFilename("out.csv");
+    action.setTargetFilenameExtension("csv");
+    action.setUploadFilename("in.csv");
+
+    assertTrue(errors(action).isEmpty());
+  }
+
+  @Test
+  void checkReportsABlankExtensionByItsRealName() {
+    ActionHttp action = new ActionHttp();
+    action.setTargetFilename("out.csv");
+    action.setUploadFilename("in.csv");
+
+    List<String> errors = errors(action);
+    assertTrue(errors.stream().anyMatch(text -> 
text.contains("targetFilenameExtension")));
+    assertTrue(errors.stream().noneMatch(text -> text.contains("Extention")));
+  }
+
+  private static List<String> errors(ActionHttp action) {
+    List<ICheckResult> remarks = new ArrayList<>();
+    action.check(remarks, null, null, null);
+    List<String> errors = new ArrayList<>();
+    for (ICheckResult remark : remarks) {
+      if (remark.getType() == ICheckResult.TYPE_RESULT_ERROR) {
+        errors.add(remark.getText());
+      }
+    }
+    return errors;
+  }
+
   @Test
   void testDeprecatedTargetFilenameExtension() {
     actionHttp.setTargetFilenameExtension("txt");
diff --git 
a/plugins/actions/pipeline/src/main/java/org/apache/hop/workflow/actions/pipeline/ActionPipeline.java
 
b/plugins/actions/pipeline/src/main/java/org/apache/hop/workflow/actions/pipeline/ActionPipeline.java
index c19623cdf2..0186076fc3 100644
--- 
a/plugins/actions/pipeline/src/main/java/org/apache/hop/workflow/actions/pipeline/ActionPipeline.java
+++ 
b/plugins/actions/pipeline/src/main/java/org/apache/hop/workflow/actions/pipeline/ActionPipeline.java
@@ -741,27 +741,12 @@ public class ActionPipeline extends ActionBase implements 
Cloneable, IAction {
               remarks,
               
AndValidator.putValidators(ActionValidatorUtils.notBlankValidator()));
     }
-    if (!Utils.isEmpty(filename)) {
-      ActionValidatorUtils.andValidator()
-          .validate(
-              this,
-              "filename",
-              remarks,
-              
AndValidator.putValidators(ActionValidatorUtils.notBlankValidator()));
-    } else {
-      ActionValidatorUtils.andValidator()
-          .validate(
-              this,
-              "pipeline-name",
-              remarks,
-              
AndValidator.putValidators(ActionValidatorUtils.notBlankValidator()));
-      ActionValidatorUtils.andValidator()
-          .validate(
-              this,
-              "directory",
-              remarks,
-              
AndValidator.putValidators(ActionValidatorUtils.notNullValidator()));
-    }
+    ActionValidatorUtils.andValidator()
+        .validate(
+            this,
+            "filename",
+            remarks,
+            
AndValidator.putValidators(ActionValidatorUtils.notBlankValidator()));
   }
 
   @Override
diff --git 
a/plugins/actions/pipeline/src/test/java/org/apache/hop/workflow/actions/pipeline/ActionPipelineCheckTest.java
 
b/plugins/actions/pipeline/src/test/java/org/apache/hop/workflow/actions/pipeline/ActionPipelineCheckTest.java
new file mode 100644
index 0000000000..1be995256c
--- /dev/null
+++ 
b/plugins/actions/pipeline/src/test/java/org/apache/hop/workflow/actions/pipeline/ActionPipelineCheckTest.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hop.workflow.actions.pipeline;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.hop.core.ICheckResult;
+import org.apache.hop.core.variables.Variables;
+import org.junit.jupiter.api.Test;
+
+class ActionPipelineCheckTest {
+
+  @Test
+  void aMissingFileIsReportedOnFilename() {
+    List<String> errors = errors(new ActionPipeline());
+
+    assertEquals(1, errors.size());
+    assertTrue(errors.get(0).contains("filename"));
+    assertTrue(errors.stream().noneMatch(text -> 
text.contains("pipeline-name")));
+    assertTrue(errors.stream().noneMatch(text -> text.contains("directory")));
+  }
+
+  @Test
+  void aSetFilenamePasses() {
+    ActionPipeline action = new ActionPipeline();
+    action.setFileName("pipelines/load.hpl");
+
+    assertTrue(errors(action).isEmpty());
+  }
+
+  private static List<String> errors(ActionPipeline action) {
+    List<ICheckResult> remarks = new ArrayList<>();
+    action.check(remarks, null, new Variables(), null);
+    List<String> errors = new ArrayList<>();
+    for (ICheckResult remark : remarks) {
+      if (remark.getType() == ICheckResult.TYPE_RESULT_ERROR) {
+        errors.add(remark.getText());
+      }
+    }
+    return errors;
+  }
+}
diff --git 
a/plugins/actions/xml/src/main/java/org/apache/hop/workflow/actions/xml/xslt/Xslt.java
 
b/plugins/actions/xml/src/main/java/org/apache/hop/workflow/actions/xml/xslt/Xslt.java
index 49dfe388ff..8989df8a4b 100644
--- 
a/plugins/actions/xml/src/main/java/org/apache/hop/workflow/actions/xml/xslt/Xslt.java
+++ 
b/plugins/actions/xml/src/main/java/org/apache/hop/workflow/actions/xml/xslt/Xslt.java
@@ -567,10 +567,10 @@ public class Xslt extends ActionBase implements 
Cloneable, IAction {
     ValidatorContext ctx = new ValidatorContext();
     putVariableSpace(ctx, getVariables());
     putValidators(ctx, notBlankValidator(), fileExistsValidator());
-    andValidator().validate(this, "xmlFilename", remarks, ctx);
-    andValidator().validate(this, "xslFilename", remarks, ctx);
+    andValidator().validate(this, "xmlfilename", remarks, ctx);
+    andValidator().validate(this, "xslfilename", remarks, ctx);
 
-    andValidator().validate(this, "outputFilename", remarks, 
putValidators(notBlankValidator()));
+    andValidator().validate(this, "outputfilename", remarks, 
putValidators(notBlankValidator()));
   }
 
   /**
diff --git 
a/plugins/actions/xml/src/test/java/org/apache/hop/workflow/actions/xml/xslt/XsltCheckTest.java
 
b/plugins/actions/xml/src/test/java/org/apache/hop/workflow/actions/xml/xslt/XsltCheckTest.java
new file mode 100644
index 0000000000..f0bbbf42fd
--- /dev/null
+++ 
b/plugins/actions/xml/src/test/java/org/apache/hop/workflow/actions/xml/xslt/XsltCheckTest.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hop.workflow.actions.xml.xslt;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.hop.core.HopEnvironment;
+import org.apache.hop.core.ICheckResult;
+import org.apache.hop.core.exception.HopException;
+import org.apache.hop.core.variables.Variables;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+
+class XsltCheckTest {
+  @TempDir Path tempDir;
+
+  @BeforeAll
+  static void setUpBeforeClass() throws HopException {
+    HopEnvironment.init();
+  }
+
+  @Test
+  void checkReadsTheLowerCaseFileNames() throws Exception {
+    Path xml = Files.writeString(tempDir.resolve("source.xml"), "<a/>");
+    Path xsl = Files.writeString(tempDir.resolve("style.xsl"), "<b/>");
+    Xslt action = new Xslt();
+    action.setXmlfilename(xml.toAbsolutePath().toString());
+    action.setXslfilename(xsl.toAbsolutePath().toString());
+    
action.setOutputfilename(tempDir.resolve("out.xml").toAbsolutePath().toString());
+
+    List<ICheckResult> remarks = new ArrayList<>();
+    action.check(remarks, null, new Variables(), null);
+
+    assertTrue(errors(remarks).isEmpty(), () -> errors(remarks).toString());
+  }
+
+  private static List<String> errors(List<ICheckResult> remarks) {
+    List<String> errors = new ArrayList<>();
+    for (ICheckResult remark : remarks) {
+      if (remark.getType() == ICheckResult.TYPE_RESULT_ERROR) {
+        errors.add(remark.getText());
+      }
+    }
+    return errors;
+  }
+}
diff --git 
a/plugins/databases/mssqlnative/src/main/java/org/apache/hop/workflow/actions/mssqlbulkload/ActionMssqlBulkLoad.java
 
b/plugins/databases/mssqlnative/src/main/java/org/apache/hop/workflow/actions/mssqlbulkload/ActionMssqlBulkLoad.java
index 9d952f0252..d808d5ec73 100644
--- 
a/plugins/databases/mssqlnative/src/main/java/org/apache/hop/workflow/actions/mssqlbulkload/ActionMssqlBulkLoad.java
+++ 
b/plugins/databases/mssqlnative/src/main/java/org/apache/hop/workflow/actions/mssqlbulkload/ActionMssqlBulkLoad.java
@@ -527,12 +527,12 @@ public class ActionMssqlBulkLoad extends ActionBase {
     AbstractFileValidator.putVariableSpace(ctx, getVariables());
     AndValidator.putValidators(
         ctx, ActionValidatorUtils.notBlankValidator(), 
ActionValidatorUtils.fileExistsValidator());
-    ActionValidatorUtils.andValidator().validate(this, "filename", remarks, 
ctx);
+    ActionValidatorUtils.andValidator().validate(this, "fileName", remarks, 
ctx);
 
     ActionValidatorUtils.andValidator()
         .validate(
             this,
-            "tablename",
+            "tableName",
             remarks,
             
AndValidator.putValidators(ActionValidatorUtils.notBlankValidator()));
   }
diff --git 
a/plugins/databases/mssqlnative/src/test/java/org/apache/hop/workflow/actions/mssqlbulkload/ActionMssqlBulkLoadCheckTest.java
 
b/plugins/databases/mssqlnative/src/test/java/org/apache/hop/workflow/actions/mssqlbulkload/ActionMssqlBulkLoadCheckTest.java
new file mode 100644
index 0000000000..3da1ac4c0e
--- /dev/null
+++ 
b/plugins/databases/mssqlnative/src/test/java/org/apache/hop/workflow/actions/mssqlbulkload/ActionMssqlBulkLoadCheckTest.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hop.workflow.actions.mssqlbulkload;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.hop.core.HopEnvironment;
+import org.apache.hop.core.ICheckResult;
+import org.apache.hop.core.exception.HopException;
+import org.apache.hop.core.variables.Variables;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+
+class ActionMssqlBulkLoadCheckTest {
+  @TempDir Path tempDir;
+
+  @BeforeAll
+  static void setUpBeforeClass() throws HopException {
+    HopEnvironment.init();
+  }
+
+  @Test
+  void checkReadsFileNameAndTableName() throws Exception {
+    Path dataFile = Files.writeString(tempDir.resolve("customers.csv"), "a\n");
+    ActionMssqlBulkLoad action = new ActionMssqlBulkLoad();
+    action.setFileName(dataFile.toAbsolutePath().toString());
+    action.setTableName("customers");
+
+    List<ICheckResult> remarks = new ArrayList<>();
+    action.check(remarks, null, new Variables(), null);
+
+    assertTrue(errors(remarks).isEmpty(), () -> errors(remarks).toString());
+  }
+
+  private static List<String> errors(List<ICheckResult> remarks) {
+    List<String> errors = new ArrayList<>();
+    for (ICheckResult remark : remarks) {
+      if (remark.getType() == ICheckResult.TYPE_RESULT_ERROR) {
+        errors.add(remark.getText());
+      }
+    }
+    return errors;
+  }
+}
diff --git 
a/plugins/databases/mysql/src/main/java/org/apache/hop/workflow/actions/mysqlbulkfile/ActionMysqlBulkFile.java
 
b/plugins/databases/mysql/src/main/java/org/apache/hop/workflow/actions/mysqlbulkfile/ActionMysqlBulkFile.java
index 09f49788a2..d10321836f 100644
--- 
a/plugins/databases/mysql/src/main/java/org/apache/hop/workflow/actions/mysqlbulkfile/ActionMysqlBulkFile.java
+++ 
b/plugins/databases/mysql/src/main/java/org/apache/hop/workflow/actions/mysqlbulkfile/ActionMysqlBulkFile.java
@@ -455,13 +455,13 @@ public class ActionMysqlBulkFile extends ActionBase {
     ActionValidatorUtils.andValidator()
         .validate(
             this,
-            "filename",
+            "fileName",
             remarks,
             
AndValidator.putValidators(ActionValidatorUtils.notBlankValidator()));
     ActionValidatorUtils.andValidator()
         .validate(
             this,
-            "tablename",
+            "tableName",
             remarks,
             
AndValidator.putValidators(ActionValidatorUtils.notBlankValidator()));
   }
diff --git 
a/plugins/databases/mysql/src/main/java/org/apache/hop/workflow/actions/mysqlbulkload/ActionMysqlBulkLoad.java
 
b/plugins/databases/mysql/src/main/java/org/apache/hop/workflow/actions/mysqlbulkload/ActionMysqlBulkLoad.java
index d66ee57197..beb546abe1 100644
--- 
a/plugins/databases/mysql/src/main/java/org/apache/hop/workflow/actions/mysqlbulkload/ActionMysqlBulkLoad.java
+++ 
b/plugins/databases/mysql/src/main/java/org/apache/hop/workflow/actions/mysqlbulkload/ActionMysqlBulkLoad.java
@@ -471,12 +471,12 @@ public class ActionMysqlBulkLoad extends ActionBase {
     AbstractFileValidator.putVariableSpace(ctx, getVariables());
     AndValidator.putValidators(
         ctx, ActionValidatorUtils.notBlankValidator(), 
ActionValidatorUtils.fileExistsValidator());
-    ActionValidatorUtils.andValidator().validate(this, "filename", remarks, 
ctx);
+    ActionValidatorUtils.andValidator().validate(this, "fileName", remarks, 
ctx);
 
     ActionValidatorUtils.andValidator()
         .validate(
             this,
-            "tablename",
+            "tableName",
             remarks,
             
AndValidator.putValidators(ActionValidatorUtils.notBlankValidator()));
   }
diff --git 
a/plugins/databases/mysql/src/test/java/org/apache/hop/workflow/actions/mysqlbulkfile/ActionMysqlBulkFileBlankFieldsTest.java
 
b/plugins/databases/mysql/src/test/java/org/apache/hop/workflow/actions/mysqlbulkfile/ActionMysqlBulkFileBlankFieldsTest.java
index e97aa20d4f..f246f607c0 100644
--- 
a/plugins/databases/mysql/src/test/java/org/apache/hop/workflow/actions/mysqlbulkfile/ActionMysqlBulkFileBlankFieldsTest.java
+++ 
b/plugins/databases/mysql/src/test/java/org/apache/hop/workflow/actions/mysqlbulkfile/ActionMysqlBulkFileBlankFieldsTest.java
@@ -30,7 +30,10 @@ import static org.mockito.Mockito.when;
 
 import java.nio.file.Path;
 import java.sql.PreparedStatement;
+import java.util.ArrayList;
+import java.util.List;
 import org.apache.hop.core.HopEnvironment;
+import org.apache.hop.core.ICheckResult;
 import org.apache.hop.core.Result;
 import org.apache.hop.core.database.Database;
 import org.apache.hop.core.database.DatabaseMeta;
@@ -94,6 +97,28 @@ class ActionMysqlBulkFileBlankFieldsTest {
     assertTrue(sql.contains(" FROM myschema.mytable "), sql);
   }
 
+  @Test
+  void checkReadsFileNameAndTableName() {
+    ActionMysqlBulkFile action = new ActionMysqlBulkFile();
+    action.setFileName("/tmp/customers.csv");
+    action.setTableName("customers");
+
+    List<ICheckResult> remarks = new ArrayList<>();
+    action.check(remarks, null, new Variables(), null);
+
+    assertTrue(errors(remarks).isEmpty(), () -> errors(remarks).toString());
+  }
+
+  private static List<String> errors(List<ICheckResult> remarks) {
+    List<String> errors = new ArrayList<>();
+    for (ICheckResult remark : remarks) {
+      if (remark.getType() == ICheckResult.TYPE_RESULT_ERROR) {
+        errors.add(remark.getText());
+      }
+    }
+    return errors;
+  }
+
   private String runAndCaptureSql(String settingsXml) throws Exception {
     Path outFile = tempDir.resolve("out.txt");
     String xml =
diff --git 
a/plugins/databases/mysql/src/test/java/org/apache/hop/workflow/actions/mysqlbulkload/ActionMysqlBulkLoadBlankFieldsTest.java
 
b/plugins/databases/mysql/src/test/java/org/apache/hop/workflow/actions/mysqlbulkload/ActionMysqlBulkLoadBlankFieldsTest.java
index 548420f7a1..d95d3a3cbd 100644
--- 
a/plugins/databases/mysql/src/test/java/org/apache/hop/workflow/actions/mysqlbulkload/ActionMysqlBulkLoadBlankFieldsTest.java
+++ 
b/plugins/databases/mysql/src/test/java/org/apache/hop/workflow/actions/mysqlbulkload/ActionMysqlBulkLoadBlankFieldsTest.java
@@ -29,7 +29,10 @@ import static org.mockito.Mockito.when;
 
 import java.nio.file.Files;
 import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.List;
 import org.apache.hop.core.HopEnvironment;
+import org.apache.hop.core.ICheckResult;
 import org.apache.hop.core.Result;
 import org.apache.hop.core.database.Database;
 import org.apache.hop.core.database.DatabaseMeta;
@@ -93,6 +96,29 @@ class ActionMysqlBulkLoadBlankFieldsTest {
     assertTrue(sql.contains("(`a`, `b`)"), sql);
   }
 
+  @Test
+  void checkReadsFileNameAndTableName() throws Exception {
+    Path dataFile = Files.writeString(tempDir.resolve("check.csv"), "a\n");
+    ActionMysqlBulkLoad action = new ActionMysqlBulkLoad();
+    action.setFileName(dataFile.toAbsolutePath().toString());
+    action.setTableName("mytable");
+
+    List<ICheckResult> remarks = new ArrayList<>();
+    action.check(remarks, null, new Variables(), null);
+
+    assertTrue(errors(remarks).isEmpty(), () -> errors(remarks).toString());
+  }
+
+  private static List<String> errors(List<ICheckResult> remarks) {
+    List<String> errors = new ArrayList<>();
+    for (ICheckResult remark : remarks) {
+      if (remark.getType() == ICheckResult.TYPE_RESULT_ERROR) {
+        errors.add(remark.getText());
+      }
+    }
+    return errors;
+  }
+
   private String runAndCaptureSql(String settingsXml) throws Exception {
     Path dataFile = Files.writeString(tempDir.resolve("data.csv"), "1;2\n");
     String xml =
diff --git 
a/plugins/misc/mail/src/main/java/org/apache/hop/mail/workflow/actions/getpop/ActionGetPOP.java
 
b/plugins/misc/mail/src/main/java/org/apache/hop/mail/workflow/actions/getpop/ActionGetPOP.java
index 1c070b6042..669962dd87 100644
--- 
a/plugins/misc/mail/src/main/java/org/apache/hop/mail/workflow/actions/getpop/ActionGetPOP.java
+++ 
b/plugins/misc/mail/src/main/java/org/apache/hop/mail/workflow/actions/getpop/ActionGetPOP.java
@@ -1238,7 +1238,7 @@ public class ActionGetPOP extends ActionBase implements 
Cloneable, IAction {
     ActionValidatorUtils.andValidator()
         .validate(
             this,
-            "SSLPort",
+            "sslPort",
             remarks,
             
AndValidator.putValidators(ActionValidatorUtils.integerValidator()));
   }
diff --git 
a/plugins/misc/mail/src/test/java/org/apache/hop/mail/workflow/actions/getpop/ActionGetPOPTest.java
 
b/plugins/misc/mail/src/test/java/org/apache/hop/mail/workflow/actions/getpop/ActionGetPOPTest.java
index fe5c45ef32..f5cd7d7dee 100644
--- 
a/plugins/misc/mail/src/test/java/org/apache/hop/mail/workflow/actions/getpop/ActionGetPOPTest.java
+++ 
b/plugins/misc/mail/src/test/java/org/apache/hop/mail/workflow/actions/getpop/ActionGetPOPTest.java
@@ -85,6 +85,16 @@ class ActionGetPOPTest {
     assertEquals("msg_alice.eml", action.getRealFilenamePattern());
   }
 
+  @Test
+  void checkValidatesSslPort() {
+    ActionGetPOP action = new ActionGetPOP("mails");
+    action.setSslPort("nope");
+
+    List<String> errors = errors(action);
+    assertTrue(errors.stream().anyMatch(text -> text.contains("sslPort is not 
an integer")));
+    assertTrue(errors.stream().noneMatch(text -> text.contains("SSLPort")));
+  }
+
   @Test
   void checkReportsMissingServer() {
     ActionGetPOP action = new ActionGetPOP("mails");
@@ -93,6 +103,18 @@ class ActionGetPOPTest {
     assertTrue(remarks.stream().anyMatch(r -> r.getType() == 
ICheckResult.TYPE_RESULT_ERROR));
   }
 
+  private static List<String> errors(ActionGetPOP action) {
+    List<ICheckResult> remarks = new ArrayList<>();
+    action.check(remarks, new WorkflowMeta(), new Variables(), new 
MemoryMetadataProvider());
+    List<String> errors = new ArrayList<>();
+    for (ICheckResult remark : remarks) {
+      if (remark.getType() == ICheckResult.TYPE_RESULT_ERROR) {
+        errors.add(remark.getText());
+      }
+    }
+    return errors;
+  }
+
   @Test
   void createOutputDirectoryRejectsUnknownFolderType() {
     ActionGetPOP action = new ActionGetPOP();

Reply via email to