-
Notifications
You must be signed in to change notification settings - Fork 45
chore(Catalog): Update embedded Camel version #2279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the embedded Camel version along with related dependency and test expectation changes.
- Updated test assertions in EntityGeneratorTest.java to use OnWhenDefinition instead of WhenDefinition.
- Modified CamelCatalogProcessorTest.java test validations to check schema locations for google-calendar and activemq components.
- Updated dependency versions in pom.xml to reflect Camel 4.11.0, Camel Quarkus 3.20.0, and Camel Kamelets 4.11.0.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generators/EntityGeneratorTest.java | Updated schema reference from WhenDefinition to OnWhenDefinition for camel onCompletion and onException tests. |
| packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/CamelCatalogProcessorTest.java | Adjusted component schema tests to validate google-calendar and activemq mappings instead of as2 and etcd3. |
| packages/catalog-generator/pom.xml | Updated Camel-related dependency versions to align with Camel 4.11.0 and related versions. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2279 +/- ##
==========================================
Coverage 82.38% 82.38%
- Complexity 466 468 +2
==========================================
Files 529 529
Lines 16971 16974 +3
Branches 3397 3532 +135
==========================================
+ Hits 13981 13984 +3
- Misses 2905 2907 +2
+ Partials 85 83 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
New versions * Camel 4.11.0 * Camel Spring Boot 4.11.0 * Camel extensions for Quarkus 3.20.0 * Camel Kamelets 4.11.0 fix: KaotoIO#2266
4cdbf0b to
de34309
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the embedded Camel versions and adjusts related tests to align with the new API changes. Key changes include:
- Updating test references from WhenDefinition to OnWhenDefinition in EntityGeneratorTest.
- Adding new tests in EIPGeneratorTest to check logging behavior and null entry handling.
- Modifying component schema references in CamelCatalogProcessorTest to reflect updated component names.
- Updating the Camel version properties in the pom.xml file.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generators/EntityGeneratorTest.java | Updated test keys from "WhenDefinition" to "OnWhenDefinition" for proper schema verification. |
| packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generators/EIPGeneratorTest.java | Added tests for logging invalid patterns and ensuring null entries are not loaded, with new Mockito usage. |
| packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/CamelCatalogProcessorTest.java | Updated schema keys from "/as2" to "/google-calendar" and from "/etcd3" to "/activemq" to match the new Camel version. |
| packages/catalog-generator/pom.xml | Updated Camel version properties to 4.11.0, Camel Quarkus to 3.20.0, and Camel Kamelets to 4.11.0. |
Comments suppressed due to low confidence (2)
packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generator/CamelCatalogProcessorTest.java:116
- Verify that the new component key '/google-calendar' (and similarly '/activemq') is consistently used across the codebase and matches the updated Camel component naming conventions.
var googleCalendarSchema = componentCatalog.withObject("/google-calendar")
packages/catalog-generator/src/test/java/io/kaoto/camelcatalog/generators/EntityGeneratorTest.java:259
- Ensure that the update from 'WhenDefinition' to 'OnWhenDefinition' is aligned with the Camel 4.11.0 API changes and update any related documentation if necessary.
.withObject("org.apache.camel.model.OnWhenDefinition").withArray("anyOf").get(0);
| logger.setUseParentHandlers(false); | ||
| logger.addHandler(mockLoggerHandler); | ||
|
|
||
| eipGenerator.kaotoPatterns.put("invalidEIP", "5@"); | ||
| eipGenerator.generate(); | ||
|
|
||
| assertTrue(mockLoggerHandler.getRecords().stream() | ||
| .anyMatch(msg -> msg.getMessage().contains("Cannot load invalidEIP definition")), | ||
| "Expected warning message not logged"); |
Copilot
AI
May 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider resetting or restoring the logger configuration after the test to prevent side effects on other tests, especially in parallel test execution.
| logger.setUseParentHandlers(false); | |
| logger.addHandler(mockLoggerHandler); | |
| eipGenerator.kaotoPatterns.put("invalidEIP", "5@"); | |
| eipGenerator.generate(); | |
| assertTrue(mockLoggerHandler.getRecords().stream() | |
| .anyMatch(msg -> msg.getMessage().contains("Cannot load invalidEIP definition")), | |
| "Expected warning message not logged"); | |
| var originalHandlers = logger.getHandlers(); | |
| var originalUseParentHandlers = logger.getUseParentHandlers(); | |
| try { | |
| logger.setUseParentHandlers(false); | |
| logger.addHandler(mockLoggerHandler); | |
| eipGenerator.kaotoPatterns.put("invalidEIP", "5@"); | |
| eipGenerator.generate(); | |
| assertTrue(mockLoggerHandler.getRecords().stream() | |
| .anyMatch(msg -> msg.getMessage().contains("Cannot load invalidEIP definition")), | |
| "Expected warning message not logged"); | |
| } finally { | |
| logger.setUseParentHandlers(originalUseParentHandlers); | |
| for (var handler : logger.getHandlers()) { | |
| logger.removeHandler(handler); | |
| } | |
| for (var handler : originalHandlers) { | |
| logger.addHandler(handler); | |
| } | |
| } |
New versions
fix: #2266