feat(java): add TCP/TLS integration tests and examples#2823
Open
atharvalade wants to merge 2 commits intoapache:masterfrom
Open
feat(java): add TCP/TLS integration tests and examples#2823atharvalade wants to merge 2 commits intoapache:masterfrom
atharvalade wants to merge 2 commits intoapache:masterfrom
Conversation
Contributor
Author
|
Resolved |
Test TLS with CA cert, server cert, plain TCP failure, and message flow over TLS
16e9f5c to
27f9165
Compare
b3d1b55 to
35ce2c5
Compare
Member
It's best if you mark WIP PRs as drafts — that way it's clearly visible from the list that they're not pending maintainer action. |
Contributor
Author
Will keep that in mind. Though these issues aren't WIP anymore. I'll update the comments. |
mmodzelewski
requested changes
Feb 26, 2026
Member
mmodzelewski
left a comment
There was a problem hiding this comment.
Cheers @atharvalade. I'll have a proper look at this later. Just a quick note - could you include these examples in the README? They're picked up by the run-java-examples-from-readme.sh script in the CI. Unless they're actually executed as part of the build, they’ll likely become outdated quite fast.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #2805
Rationale
The Java SDK had TLS builder methods but no integration tests connecting to a TLS server and no TLS examples.
What changed?
Existing tests only verified TLS builder method chaining but never actually connected to a TLS server.
Added
TlsConnectionTestintegration test using Testcontainers with TLS certificates mounted fromcore/certs/. Tests cover: TLS connection with CA cert, TLS connection with server cert, plain TCP failure when TLS is required, and full send/receive message flow over TLS. AddedTcpTlsProducerandTcpTlsConsumerexamples usingIggyTcpClient.builder().enableTls().tlsCertificate(...).Local Execution
Passed.
spotlessCheckandcompileJava/compileTestJavaclean in bothexamples/javaandforeign/java.AI Usage
GettingStartedexamples,BaseIntegrationTest, and C# TLS test patterns