Skip to content

Add integration tests for aws2-translate #2403#8310

Open
sanjana2505006 wants to merge 3 commits intoapache:mainfrom
sanjana2505006:aws2-translate-tests
Open

Add integration tests for aws2-translate #2403#8310
sanjana2505006 wants to merge 3 commits intoapache:mainfrom
sanjana2505006:aws2-translate-tests

Conversation

@sanjana2505006
Copy link
Contributor

@sanjana2505006 sanjana2505006 commented Feb 17, 2026

Added integration tests for the AWS2 Translate component. Covers translateText and listLanguages operations. Fixes #2403.

@sanjana2505006 sanjana2505006 force-pushed the aws2-translate-tests branch 3 times, most recently from 9fe76ec to f15d425 Compare February 17, 2026 16:29
@sanjana2505006
Copy link
Contributor Author

@ppalaga Whenever you get a chance, please review and let me know if any changes are needed

import org.apache.camel.telemetry.decorators.PlatformHttpSpanDecorator;
import org.apache.camel.telemetry.decorators.ServletSpanDecorator;

public class CamelQuarkusOpenTelemetry2Tracer extends OpenTelemetryTracer {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this. It does not seem to be related to this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that, I removed the unrelated file. Force pushed the update.

@sanjana2505006
Copy link
Contributor Author

@jamesnetherton I’ve just force-pushed an update to address the failing checks.
The main issue was a missing application.properties file in the aws2-translate module, which was preventing the component from correctly picking up the credentials in the CI environment. I've also re-synced the project formatting to ensure the grouped tests are correctly aligned.

@jamesnetherton
Copy link
Contributor

You'll need to rebase and update the versions in the pom.xml files from 3.32.0-SNAPSHOT to 3.33.0-SNAPSHOT.

@jamesnetherton
Copy link
Contributor

There are test failures related to this change.

Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: aws2-translate://test?operation=listLanguages due to: Error binding property (operation=listLanguages) with name: operation on bean: aws2-translate://test?operation=listLanguages with value: listLanguages

Without sufficient context, it's often not enough to rely blindly on AI tooling to generate working code. Take some time to understand Camel, the component documentation & run tests locally to verify changes:

https://camel.apache.org/components/next/aws2-translate-component.html

@sanjana2505006
Copy link
Contributor Author

There are test failures related to this change.

Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: aws2-translate://test?operation=listLanguages due to: Error binding property (operation=listLanguages) with name: operation on bean: aws2-translate://test?operation=listLanguages with value: listLanguages

Without sufficient context, it's often not enough to rely blindly on AI tooling to generate working code. Take some time to understand Camel, the component documentation & run tests locally to verify changes:

https://camel.apache.org/components/next/aws2-translate-component.html

Thank you for the feedback and the guidance. I'm a student currently learning the Camel ecosystem, and I appreciate you pointing me toward the documentation.

I have rebased the PR onto the latest main branch and updated the versions to 3.33.0-SNAPSHOT as requested. I've also taken the time to review the AWS2 Translate component documentation more carefully. I realised that the listLanguages operation I initially included is not supported by the component, which was causing the endpoint resolution error. I have removed that unsupported test case and corrected the URI format.

Thank you for your patience as I learn the ropes!

@jamesnetherton
Copy link
Contributor

Turns out that AWS Translate is not supported on LocalStack:

software.amazon.awssdk.services.translate.model.TranslateException: Sorry, the TranslateText operation on the translate service is not currently supported by LocalStack

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.

Test AWS 2 Translate

2 participants