Skip to content
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

mtls-certificates: CertificateRoleMappingTest fails in native #40553

Closed
Karm opened this issue May 10, 2024 · 4 comments · Fixed by #42156
Closed

mtls-certificates: CertificateRoleMappingTest fails in native #40553

Karm opened this issue May 10, 2024 · 4 comments · Fixed by #42156
Assignees
Labels
area/native-image kind/bug Something isn't working
Milestone

Comments

@Karm
Copy link
Member

Karm commented May 10, 2024

Describe the bug

[ERROR] Failures: 
[ERROR]   CertificateRoleMappingIT>CertificateRoleMappingTest.testNoClientCertificate:49 Insecure requests must fail at the transport level ==> Unexpected exception type thrown, expected: <java.net.ConnectException> but was: <javax.net.ssl.SSLHandshakeException>

Expected behavior

Both JVM mode and Native mode pass the test.

Actual behavior

Native mode fails.

How to Reproduce?

$ ./mvnw clean install -f integration-tests -pl mtls-certificates -Pnative -Dstart-containers -DskipTests=false -DskipITs=false -Dnative.surefire.skip=false

Output of uname -a or ver

Linux mandrel2 5.14.0-407.el9.aarch64 #1 SMP PREEMPT_DYNAMIC Thu Jan 11 00:18:37 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

Output of java -version

OpenJDK Runtime Environment Mandrel-23.1.3.1-Final (build 21.0.3+9-LTS)

Quarkus version or git rev

3.10.0

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.3 (21122926829f1ead511c958d89bd2f672198ae9f)

Additional information

No response

@Karm Karm added the kind/bug Something isn't working label May 10, 2024
Copy link

quarkus-bot bot commented May 10, 2024

/cc @galderz (mandrel), @zakkak (mandrel,native-image)

@Karm Karm self-assigned this May 10, 2024
@sberyozkin
Copy link
Member

Hi @Karm It is probably system or GraalVM version dependent, how Java SSL reacts to an SSL error, and we can fix it by adding an extra catch block in the test, would you like to add it ?

@sberyozkin
Copy link
Member

@Karm Sorry, I noticed you self-assigned, whatever fix you prefer will be nice to have

@Karm
Copy link
Member Author

Karm commented Jul 26, 2024

@sberyozkin Hello, I am sorry, I forgot about this issue completely. I've just read it on loglevel DEBUG as it seemed weird that the connection was supposed to be refused. The native behavior seemed more correct to me, i.e. a failed handshake.

It all boils down to the testframework and the ports the test app is started with. The test has never worked before in HotSpot, because it had been trying to connect to a wrong port, hence the Connection exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/native-image kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants