You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Native image agent integration fails to work with integration tests that rely on external services, e.g. DBs:
2024-07-09 07:07:30,088 INFO [io.qua.dev.h2.dep.H2DevServicesProcessor] (build-4) Dev Services for H2 started.
2024-07-09 07:07:30,092 INFO [io.qua.dat.dep.dev.DevServicesDatasourceProcessor] (build-4) Dev Services for default datasource (h2) started
2024-07-09 07:07:30,779 INFO [io.qua.tes.com.DefaultDockerContainerLauncher] (main) Executing "podman run --name quarkus-integration-test-ZonVU -i --rm --user 501:20 -p 8081:8081 -p 8444:8444 --entrypoint java -v /Users/galder/tmp/jinq-native-agent/0807/quarkus-jinq/target:/project --env QUARKUS_LOG_CATEGORY__IO_QUARKUS__LEVEL=INFO --env QUARKUS_HTTP_PORT=8081 --env QUARKUS_HTTP_SSL_PORT=8444 --env TEST_URL=http://localhost:8081 --env QUARKUS_PROFILE=test-with-native-agent --env QUARKUS_DATASOURCE_PASSWORD=quarkus --env QUARKUS_DATASOURCE_DB_KIND=h2 --env QUARKUS_DATASOURCE_DEVSERVICES_REUSE=true --env QUARKUS_DATASOURCE_JDBC_URL=jdbc:h2:tcp://localhost:58351/mem:quarkus;DB_CLOSE_DELAY=-1 --env QUARKUS_DATASOURCE_USERNAME=quarkus --env QUARKUS_TEST_INTEGRATION_TEST_PROFILE=test-with-native-agent quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21 -agentlib:native-image-agent=access-filter-file=quarkus-access-filter.json,caller-filter-file=quarkus-caller-filter.json,config-output-dir=native-image-agent-base-config, -jar quarkus-app/quarkus-run.jar"
The dev services start bare metal in localhost, but Quarkus runs in container, so Quarkus cannot access those. In this case Quarkus fails to start, e.g.
2024-07-09 06:07:38,370 ERROR [io.qua.run.Application] (main) Failed to start application (with profile [test-with-native-agent]): java.lang.RuntimeException: Failed to start quarkus
...
Caused by: org.hibernate.exception.JDBCConnectionException: Unable to open JDBC Connection for DDL execution [Connection is broken: "java.net.ConnectException: Connection refused: localhost:58351" [90067-224]] [n/a]
Native image agent integration fails to work with integration tests that rely on external services, e.g. DBs:
The dev services start bare metal in localhost, but Quarkus runs in container, so Quarkus cannot access those. In this case Quarkus fails to start, e.g.
This is originally reported by @ebramirez in this Zulip chat.
The text was updated successfully, but these errors were encountered: