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 ed0edab0d2 Fix Do not add Pipeline Unit Test when dialog is cancelled 
or closed (#6405)
ed0edab0d2 is described below

commit ed0edab0d2ee6e841db9f1956ccd0491bff316c6
Author: lance <[email protected]>
AuthorDate: Fri Jan 16 16:02:34 2026 +0800

    Fix Do not add Pipeline Unit Test when dialog is cancelled or closed (#6405)
    
    Signed-off-by: lance <[email protected]>
---
 .../src/main/java/org/apache/hop/testing/gui/TestingGuiPlugin.java  | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git 
a/plugins/misc/testing/src/main/java/org/apache/hop/testing/gui/TestingGuiPlugin.java
 
b/plugins/misc/testing/src/main/java/org/apache/hop/testing/gui/TestingGuiPlugin.java
index c6ae88037e..d4efed5fc9 100644
--- 
a/plugins/misc/testing/src/main/java/org/apache/hop/testing/gui/TestingGuiPlugin.java
+++ 
b/plugins/misc/testing/src/main/java/org/apache/hop/testing/gui/TestingGuiPlugin.java
@@ -930,6 +930,12 @@ public class TestingGuiPlugin {
             hopGui.getShell());
     PipelineUnitTest test = manager.newMetadata();
     if (test != null) {
+      // If the user clicks Cancel or closes the window,
+      // the current unit test will not be added to the list.
+      if (Utils.isEmpty(test.getMetadataProviderName())) {
+        return;
+      }
+
       // Activate the test
       refreshUnitTestsList();
       selectUnitTest(pipelineMeta, test);

Reply via email to