Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lordrip
Copy link
Member

@lordrip lordrip commented May 13, 2025

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: #2266

@lordrip lordrip requested a review from Copilot May 13, 2025 16:19
Copy link
Contributor

Copilot AI left a 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
Copy link

codecov bot commented May 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.38%. Comparing base (dc7d7b1) to head (de34309).
Report is 15 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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
@lordrip lordrip force-pushed the chore/update-embedded-camel branch from 4cdbf0b to de34309 Compare May 14, 2025 03:10
@lordrip lordrip requested a review from a team May 14, 2025 03:11
@sonarqubecloud
Copy link

@lordrip lordrip requested a review from Copilot May 14, 2025 03:31
@lordrip lordrip marked this pull request as ready for review May 14, 2025 03:31
Copy link
Contributor

Copilot AI left a 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);

Comment on lines +104 to +112
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");
Copy link

Copilot AI May 14, 2025

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.

Suggested change
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);
}
}

Copilot uses AI. Check for mistakes.
@lordrip lordrip merged commit 4b472d5 into KaotoIO:main May 14, 2025
14 checks passed
@lordrip lordrip deleted the chore/update-embedded-camel branch May 14, 2025 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Catalog] Update pom.xml Camel dependencies

2 participants