mattcasters opened a new pull request, #8520:
URL: https://github.com/apache/hop/pull/8520

   ## What this does
   
   A pipeline unit test database replacement was logged and then discarded. 
Database Lookup, and every other transform that stores a connection name, still 
opened the original database.
   
   `PipelineMetaModifier` called `DatabaseMeta.replaceMeta()` on the object 
returned by `findDatabase()`. That load is either a throwaway copy (project 
JSON metadata) or the shared metadata object (in-memory provider). Transforms 
never read that object. They keep the connection name and load it again at 
runtime, so a lookup configured with `source-db` still opened `source-db`.
   
   The in-memory test copy now rewrites relational connection names 
(`RDBMS_CONNECTION`) from the original connection to the replacement. The 
project connection and the pipeline on disk are unchanged. Replacements are 
applied once and do not chain. A connection name that is a variable is resolved 
first and then stored as the literal replacement name.
   
   Add Sequence, Get Table Names, JDBC Metadata, and Synchronize after merge 
stored a relational connection without the `RDBMS_CONNECTION` marker, so those 
fields are marked as well.
   
   Fixes #8417.
   
   ## How to verify
   
   `./mvnw -pl plugins/misc/testing -am test -Dtest=PipelineMetaModifierTest 
-Dsurefire.failIfNoSpecifiedTests=false`
   
   The test uses a Generic connection with the SQL Server driver class and an 
H2 replacement. It checks that the copied Database Lookup resolves to the H2 
driver, that the original connection is not modified, that a `${DB}` reference 
becomes the literal replacement, and that a missing replacement still fails 
without touching the source connection.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to