apupier opened a new pull request, #31291:
URL: https://github.com/apache/camel/pull/31291

   ## Problem
   
   `RunExportGoldenTest.export` fails with a diff in which only the position of 
one line changes:
   
   ```
   -dependency=mvn\:org.apache.camel\:camel-kamelet\:${camel.version}   
(expected, after org.example:extra)
   +dependency=mvn\:org.apache.camel\:camel-kamelet\:${camel.version}   
(actual, after commons-lang3)
   ```
   
   The `dependency=` lines of the run settings are written by 
`RunDownloadListener` as the dependencies are downloaded, so their order is the 
order of the downloads. It is not a contract of `camel run` / `camel export`, 
but the golden files recorded one order.
   
   ## Regression
   
   The order changed with 3a270f9e7ccb (CAMEL-27103, #31245: do not build the 
CamelContext before Camel Main has configured it): the `kamelet` component is 
now created later by `DependencyDownloaderKamelet`, so `camel-kamelet` is 
downloaded later.
   
   ## Fix
   
   - `RunExportGoldenTest.normalize()` sorts each block of `dependency=` lines 
(next to the existing `sortFileLists()`), so the test no longer depends on the 
download order.
   - The 17 `*.export.txt` golden files are regenerated with 
`-Dcamel.golden.update=true`: only `dependency=` lines are moved, nothing is 
added or removed.
   
   ## Tests
   
   `RunExportGoldenTest` (49 tests) passes without the update flag; formatter 
and impsort produce no changes.
   
   No JIRA ticket (test-only change).
   
   _IBM Bob on behalf of @apupier_
   


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