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

DockerClientProviderException #272

Open
mhlmhlmhlmhl opened this issue Apr 25, 2024 · 0 comments
Open

DockerClientProviderException #272

mhlmhlmhlmhl opened this issue Apr 25, 2024 · 0 comments

Comments

@mhlmhlmhlmhl
Copy link

I'm getting this error when I run an integration test in our CI pipeline (on BitBucket), but all works fine when run on my laptop:

`TenantScopedEntityTest > initializationError FAILED java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:180

Caused by: org.springframework.beans.factory.BeanCreationException at AbstractAutowireCapableBeanFactory.java:1773
Caused by: jakarta.persistence.PersistenceException at AbstractEntityManagerFactoryBean.java:421
Caused by: io.zonky.test.db.shaded.com.google.common.util.concurrent.UncheckedExecutionException at Futures.java:1546
Caused by: io.zonky.test.db.provider.ProviderException at DockerPostgresDatabaseProvider.java:117
Caused by: java.lang.IllegalStateException at DockerClientProviderStrategy.java:277`

Following various suggestions, I have:

  • Added this to my application.yml file:
    zonky.test.database.postgres.docker.image: postgres:15.2 # Docker image containing PostgreSQL database. zonky.test.database.postgres.docker.tmpfs.enabled: false # Whether to mount postgres data directory as tmpfs. zonky.test.database.postgres.docker.tmpfs.options: rw,noexec,nosuid # Mount options used to configure the tmpfs filesystem.

  • Added a dependency: implementation "net.java.dev.jna:jna:5.14.0"

I am using Gradle 8.5 with jvm-test-suites and Java 17. My integration test dependencies are:

testIntegration(JvmTestSuite) { testType = TestSuiteType.INTEGRATION_TEST sources { java { srcDirs = ['src/testIntegration/java'] } } dependencies { implementation project() implementation "com.cayuse:cayuse-common:${cayuseCommonVersion}" implementation "io.zonky.test:embedded-database-spring-test:${zonkyEmbeddedDatabaseVersion}" implementation "org.springframework.boot:spring-boot-starter-data-jpa:${springBootVersion}" implementation "org.postgresql:postgresql:${postgresSqlVersion}" implementation "net.java.dev.jna:jna:${jnaVersion}" } targets { all { testTask.configure { shouldRunAfter(test) } } } }
The relevant portion of the gradle.properties file is:
cayuseCommonVersion=3.0.0 jnaVersion=5.14.0 postgresSqlVersion=42.7.2 springBootVersion=3.2.2 zonkyEmbeddedDatabaseVersion=2.5.0

My laptop (where the integration test works) is a Mac M3 Pro running Sonoma 14.1.2. The BitBucket pipeline (where the above error happens) is running on some AWS server.

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

No branches or pull requests

1 participant