zonkyio / embedded-database-spring-test

A library for creating isolated embedded databases for Spring-powered integration tests.
Apache License 2.0
411 stars 37 forks source link

Spring Boot 3.3 Support #273

Closed Wallman closed 1 month ago

Wallman commented 4 months ago

Would be great to have Spring Boot 3.3 support

Philippvs commented 4 months ago

That would help a lot!

Wallman commented 4 months ago

Or does it already have support? Seems to work for us.

Philippvs commented 4 months ago

Yes but with errors

tomix26 commented 4 months ago

Thanks for the report. Could you please attach a log with the error for easier investigation?

I'm quite busy right now, but I will take a look at it next week or the week after.

Philippvs commented 4 months ago

The Problem is the following: If a test fails for instance then it will not be stopped (that problem does not exist in Spring boot 3.2)

Bildschirmfoto 2024-07-05 um 08 39 38 Bildschirmfoto 2024-07-05 um 08 43 22

Full Stack trace: ` 2024-07-07T13:19:10.016+02:00 WARN 10912 --- [pool-3-thread-1] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: 08001 2024-07-07T13:19:10.016+02:00 ERROR 10912 --- [pool-3-thread-1] o.h.engine.jdbc.spi.SqlExceptionHelper : Connection to localhost:60279 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. 2024-07-07T13:19:10.019+02:00 ERROR 10912 --- [pool-3-thread-1] o.s.s.s.TaskUtils$LoggingErrorHandler : Unexpected error occurred in scheduled task

org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:466) ~[spring-orm-6.1.10.jar:6.1.10] at org.springframework.transaction.support.AbstractPlatformTransactionManager.startTransaction(AbstractPlatformTransactionManager.java:532) ~[spring-tx-6.1.10.jar:6.1.10] at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:405) ~[spring-tx-6.1.10.jar:6.1.10] at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:617) ~[spring-tx-6.1.10.jar:6.1.10] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:386) ~[spring-tx-6.1.10.jar:6.1.10] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-6.1.10.jar:6.1.10] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184) ~[spring-aop-6.1.10.jar:6.1.10] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768) ~[spring-aop-6.1.10.jar:6.1.10] at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:720) ~[spring-aop-6.1.10.jar:6.1.10] at com.bmw.tmx.service.scheduler.SchedulerExecutionJob$$SpringCGLIB$$0.executeScheduledJob() ~[classes/:na] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:578) ~[na:na] at org.springframework.scheduling.support.ScheduledMethodRunnable.runInternal(ScheduledMethodRunnable.java:130) ~[spring-context-6.1.10.jar:6.1.10] at org.springframework.scheduling.support.ScheduledMethodRunnable.lambda$run$2(ScheduledMethodRunnable.java:124) ~[spring-context-6.1.10.jar:6.1.10] at io.micrometer.observation.Observation.observe(Observation.java:499) ~[micrometer-observation-1.13.1.jar:1.13.1] at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:124) ~[spring-context-6.1.10.jar:6.1.10] at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-6.1.10.jar:6.1.10] at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:96) ~[spring-context-6.1.10.jar:6.1.10] at org.springframework.security.concurrent.DelegatingSecurityContextRunnable.run(DelegatingSecurityContextRunnable.java:94) ~[spring-security-core-6.3.1.jar:6.3.1] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577) ~[na:na] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[na:na] at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na] at java.base/java.lang.Thread.run(Thread.java:1589) ~[na:na] Caused by: org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection [Connection to localhost:60279 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.] [n/a] at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:100) ~[hibernate-core-6.5.2.Final.jar:6.5.2.Final] at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:58) ~[hibernate-core-6.5.2.Final.jar:6.5.2.Final] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:108) ~[hibernate-core-6.5.2.Final.jar:6.5.2.Final] at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:94) ~[hibernate-core-6.5.2.Final.jar:6.5.2.Final] at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:116) ~[hibernate-core-6.5.2.Final.jar:6.5.2.Final] at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getPhysicalConnection(LogicalConnectionManagedImpl.java:143) ~[hibernate-core-6.5.2.Final.jar:6.5.2.Final] at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getConnectionForTransactionManagement(LogicalConnectionManagedImpl.java:273) ~[hibernate-core-6.5.2.Final.jar:6.5.2.Final] at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.begin(LogicalConnectionManagedImpl.java:281) ~[hibernate-core-6.5.2.Final.jar:6.5.2.Final] at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.begin(JdbcResourceLocalTransactionCoordinatorImpl.java:232) ~[hibernate-core-6.5.2.Final.jar:6.5.2.Final] at org.hibernate.engine.transaction.internal.TransactionImpl.begin(TransactionImpl.java:83) ~[hibernate-core-6.5.2.Final.jar:6.5.2.Final] at org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:176) ~[spring-orm-6.1.10.jar:6.1.10] at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:420) ~[spring-orm-6.1.10.jar:6.1.10] ... 24 common frames omitted Caused by: org.postgresql.util.PSQLException: Connection to localhost:60279 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:346) ~[postgresql-42.7.3.jar:42.7.3] at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:54) ~[postgresql-42.7.3.jar:42.7.3] at org.postgresql.jdbc.PgConnection.(PgConnection.java:273) ~[postgresql-42.7.3.jar:42.7.3] at org.postgresql.Driver.makeConnection(Driver.java:446) ~[postgresql-42.7.3.jar:42.7.3] at org.postgresql.Driver.connect(Driver.java:298) ~[postgresql-42.7.3.jar:42.7.3] at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:683) ~[java.sql:na] at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:230) ~[java.sql:na] at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:104) ~[postgresql-42.7.3.jar:42.7.3] at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:88) ~[postgresql-42.7.3.jar:42.7.3] at io.zonky.test.db.provider.support.AbstractEmbeddedDatabase.getConnection(AbstractEmbeddedDatabase.java:24) ~[embedded-database-spring-test-2.4.0.jar:na] at io.zonky.test.db.provider.support.BlockingDatabaseWrapper.getConnection(BlockingDatabaseWrapper.java:61) ~[embedded-database-spring-test-2.4.0.jar:na] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:578) ~[na:na] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:354) ~[spring-aop-6.1.10.jar:6.1.10] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:216) ~[spring-aop-6.1.10.jar:6.1.10] at jdk.proxy2/jdk.proxy2.$Proxy141.getConnection(Unknown Source) ~[na:na] at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) ~[hibernate-core-6.5.2.Final.jar:6.5.2.Final] at org.hibernate.internal.NonContextualJdbcConnectionAccess.obtainConnection(NonContextualJdbcConnectionAccess.java:46) ~[hibernate-core-6.5.2.Final.jar:6.5.2.Final] at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:113) ~[hibernate-core-6.5.2.Final.jar:6.5.2.Final] ... 31 common frames omitted Caused by: java.net.ConnectException: Connection refused at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[na:na] at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) ~[na:na] at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542) ~[na:na] at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:585) ~[na:na] at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) ~[na:na] at java.base/java.net.Socket.connect(Socket.java:666) ~[na:na] at org.postgresql.core.PGStream.createSocket(PGStream.java:243) ~[postgresql-42.7.3.jar:42.7.3] at org.postgresql.core.PGStream.(PGStream.java:98) ~[postgresql-42.7.3.jar:42.7.3] at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:136) ~[postgresql-42.7.3.jar:42.7.3] at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:262) ~[postgresql-42.7.3.jar:42.7.3] ... 49 common frames omitted `

tomix26 commented 3 months ago

@Philippvs I tried it and everything worked as expected. However, based on the log you sent, I would guess that the issue might be caused by database calls from a scheduled background thread (originating from Micrometer) in combination with refresh mode.

If you are using @AutoConfigureEmbeddedDatabase(refresh = XXX) or @FlywayTest annotations, new databases are continuously created and destroyed in the background. If there is a scheduled thread that is not aligned with the test phases, it might call a database that no longer exists, causing the error described above.

Nevertheless, such exceptions should be relatively rare and should not affect the test results. The solution is either to suppress such background threads, as they introduce non-determinism into the tests, or not to use refresh mode, which ensures a common database across all tests.

So, I would like to confirm if you are using refresh mode and how often the described error occurs? Or, if you think the error is caused by something else, I would need a reproducer for further investigation of the issue.

Philippvs commented 3 months ago

Yes I am using the following:

@AutoConfigureEmbeddedDatabase(refresh = AutoConfigureEmbeddedDatabase.RefreshMode.AFTER_EACH_TEST_METHOD)

Downgrading from Spring 3.3 to 3.2 resolves the problem. When running all the tests of a test class the suit does not terminate and keeps open like in an endless loop. Same for running a single test. I do not use any background jobs in my tests.

tomix26 commented 3 months ago

Ok, thank you for the clarification.

While you may not be using any background jobs explicitly, I noticed the following line in the log: at io.micrometer.observation.Observation.observe(Observation.java:499) ~[micrometer-observation-1.13.1.jar:1.13.1]

This suggests that there's a Micrometer thread running in the background, likely attempting to report some application metrics to the database. It's possible that between Spring 3.2 and 3.3, there was a change in Micrometer configuration resulting in this background thread running. I can't determine if this is intended behavior or a bug. From my perspective, I would recommend disabling such features that are not directly related to the test, as they can lead to non-deterministic behavior, as I mentioned earlier.

I would really like to help you solve this problem, but without a reproducer, I can't accurately assess what's happening in your project, which auto-configurations are active, and how they're interacting with each other.

reneleonhardt commented 3 months ago

@Philippvs Could you provide a minimal example repo for reproducing your problem so Spring Boot 3.3 support could move forward? Otherwise 3.4 will come out faster 😅

tomix26 commented 3 months ago

@reneleonhardt Are you also experiencing some issues when upgrading to Spring Boot 3.3?

reneleonhardt commented 3 months ago

Didn't have time yet to upgrade to 3.3, there were some breaking changes (Prometheus sigh). My issue with Zonky in the past was that it was not easy to configure the base template as needed (init.sql first, then flyway migrations, then class BeforeAll, then BeforeEach) and to use the refresh mode between separate test methods so every class and method could run in parallel without long context reload times to reduce integration test time by several minutes). When I have time I will report if those are still obstacles for me or if RTFM helped this time 😅

For me personally it would help massively if there would always be a minimal but complete "right way" example for the latest versions (SB 3.3, Zonky 2.5/2.0, JUnit 5.10, Postgres 16, Java 21 with Virtual Threads and Shenandoah for 1 ms max GC pauses), which would be run as a GitHub workflow inside this repo, so I know it would be working and contain all necessary configuration/annotations needed for the fastest DB tests so I can get rid of super slow and often breaking testcontainers-java at least for Postgres. At least one thing is good about slow Kafka... EmbeddedKafka makes a Docker container unnecessary for most integration tests 😄

tomix26 commented 3 months ago

Thank you for your comprehensive comment 🙂

init.sql first, then flyway migrations, then ...

Yes, this is a known issue. I plan to improve and simplify this in the future. Unfortunately, there isn't much time to develop new features right now.

so every class and method could run in parallel

I'm not sure about the current capabilities of the Spring framework, but previously, parallelization was only possible at the JVM process level. So it wasn't possible for one Spring context to be shared by multiple threads from different tests. Perhaps this has changed, I have no idea.

it would help massively if there would always be a minimal but complete "right way" example for the latest versions

In this spirit, I created the project https://github.com/tomix26/embedded-database-demo, where I test new versions of Spring and other libraries. It's true that it's not entirely up-to-date right now, but I've upgraded the versions of necessary libraries locally, and everything still works the same way.

with Virtual Threads and Shenandoah for 1 ms max GC pauses

What's so special about virtual threads and this specific GC in connection with this library that makes it necessary to have it incorporated in the GitHub workflow?

reneleonhardt commented 3 months ago

Thank you for your comprehensive comment 🙂

You're welcome!

Yes, this is a known issue. I plan to improve and simplify this in the future. Unfortunately, there isn't much time to develop new features right now.

I can imagine, it's hard to find time to make all contributions yourself. Maybe you could lay out a rough idea to achieve this, for example in a milestone containing some issues, then the community could contribute the necessary steps more easily.

I'm not sure about the current capabilities of the Spring framework, but previously, parallelization was only possible at the JVM process level. So it wasn't possible for one Spring context to be shared by multiple threads from different tests. Perhaps this has changed, I have no idea.

I'm not sure either, I just see with Cucumber and a Postgres Testcontainer everyday for example, that not even classes are possible to run in parallel, so the integration tests are multiplying the build time several times 😠 As an alternative, could the base template and every derived template (containing the test method specific data) maybe prepared in BeforeAll, so each test method only had to choose the template specific for itself? So the context would not need to be refreshed/replaced before each test method?

template test level structure data
base class init + flyway common data for all methods in this class
method1 method derived from base all data needed for method1 including derived base data
method2 method derived from base all data needed for method2 including derived base data
methodN method derived from base all data needed for methodN including derived base data

In this spirit, I created the project https://github.com/tomix26/embedded-database-demo, where I test new versions of Spring and other libraries. It's true that it's not entirely up-to-date right now, but I've upgraded the versions of necessary libraries locally, and everything still works the same way.

Thank you very much, I will look into it this week! 👍

What's so special about virtual threads and this specific GC in connection with this library that makes it necessary to have it incorporated in the GitHub workflow?

It's not really necessary for tests, but it helped me massively in my last project, Shenandoah and ZGC are modern Hotspot GCs which can help reducing stop-the-world pauses / latency dozens or hundreds of times. After my last lessons learned I just want to be sure that frameworks and libraries make proper use of modern JVM features to avoid bad production surprises where Spring endpoints took 2 seconds when their parallel DB queries took only a few milliseconds. Pro tip: Use Jaeger Tracing to search and visualize those blocking pauses, then you can watch GC metrics in Grafana 😉

tomix26 commented 3 months ago

I've just upgraded the https://github.com/tomix26/embedded-database-demo project to Spring 3.3.2 and JUnit 5, and everything works as expected. However, the project doesn't include Micrometer, so I couldn't verify the issue reported above.

So the context would not need to be refreshed/replaced before each test method?

If you're talking about the Spring context, it doesn't need to be refreshed/replaced because of the database. The Zonky library tries to avoid refreshing the Spring context under all circumstances. The problem with parallelizing tests in Spring is that if multiple tests share the same context, the beans of this context are also shared among these tests. So you have, for example, 10 tests, and they have a shared DataSource bean. This isn't a problem if the tests run sequentially. Whenever a specific test is running, the database referenced by the DataSource bean is set up and loaded by data for that particular test. However, if the tests run in parallel and the DataSource bean is shared, it's necessary to implement some smart request dispatching so that based on which test is calling the DataSource at a given moment, the call is delegated to the corresponding underlying database. This, besides being problematic to implement, can also significantly complicate the predictability of tests and their debugging.

divStar commented 1 month ago

I have just checked out the embedded-database-demo repository and am having the same issue the OP is having. I also have it on my other project.

The issue solely occurs when using zonky.test.database.provider=docker (default). When using the zonky provider, it works in my other application.

Here's the full stacktrace (I haven't added or changed anything, just ran all the tests using IntelliJ):

Full stacktrace ```java 2024-09-26T23:00:18.975+02:00 INFO --- [ main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.github.tomix26.embedded.database.demo.CustomDataJpaAnnotationTest]: CustomDataJpaAnnotationTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. 2024-09-26T23:00:19.034+02:00 INFO --- [ main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.github.tomix26.embedded.database.demo.DemoApplication for test class com.github.tomix26.embedded.database.demo.CustomDataJpaAnnotationTest . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v3.3.2) 2024-09-26T23:00:19.200+02:00 INFO 59282 --- [ main] c.g.t.e.d.d.CustomDataJpaAnnotationTest : Starting CustomDataJpaAnnotationTest using Java 17.0.12 with PID 59282 (started by igvo in /Users/igvo/workspaces/embedded-database-demo) 2024-09-26T23:00:19.200+02:00 INFO 59282 --- [ main] c.g.t.e.d.d.CustomDataJpaAnnotationTest : No active profile set, falling back to 1 default profile: "default" 2024-09-26T23:00:19.361+02:00 INFO 59282 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 2024-09-26T23:00:19.381+02:00 INFO 59282 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 17 ms. Found 1 JPA repository interface. 2024-09-26T23:00:19.419+02:00 INFO 59282 --- [ main] EmbeddedDatabaseContextCustomizerFactory : Replacing 'dataSource' DataSource bean with embedded version 2024-09-26T23:00:19.513+02:00 WARN 59282 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'io.zonky.test.db.config.EmbeddedDatabaseAutoConfiguration' of type [io.zonky.test.db.config.EmbeddedDatabaseAutoConfiguration$$SpringCGLIB$$0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). The currently created BeanPostProcessor [flywayDatabaseExtension] is declared through a non-static factory method on that class; consider declaring it as static instead. 2024-09-26T23:00:19.738+02:00 INFO 59282 --- [ prefetching-1] org.testcontainers.images.PullPolicy : Image pull policy will be performed by: DefaultPullPolicy() 2024-09-26T23:00:19.739+02:00 INFO 59282 --- [ prefetching-1] o.t.utility.ImageNameSubstitutor : Image name substitution will be performed by: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor') 2024-09-26T23:00:19.847+02:00 INFO 59282 --- [ prefetching-1] o.t.d.DockerClientProviderStrategy : Loaded org.testcontainers.dockerclient.UnixSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first 2024-09-26T23:00:19.973+02:00 INFO 59282 --- [ prefetching-1] o.t.d.DockerClientProviderStrategy : Found Docker environment with local Unix socket (unix:///var/run/docker.sock) 2024-09-26T23:00:19.974+02:00 INFO 59282 --- [ prefetching-1] org.testcontainers.DockerClientFactory : Docker host IP address is localhost 2024-09-26T23:00:19.989+02:00 INFO 59282 --- [ prefetching-1] org.testcontainers.DockerClientFactory : Connected to docker: Server Version: 24.0.7 API Version: 1.43 Operating System: Ubuntu 23.10 Total Memory: 5914 MB 2024-09-26T23:00:20.010+02:00 INFO 59282 --- [ prefetching-1] tc.testcontainers/ryuk:0.7.0 : Pulling docker image: testcontainers/ryuk:0.7.0. Please be patient; this may take some time but only needs to be done once. 2024-09-26T23:00:21.949+02:00 INFO 59282 --- [tream-516338723] tc.testcontainers/ryuk:0.7.0 : Starting to pull image 2024-09-26T23:00:21.965+02:00 INFO 59282 --- [tream-516338723] tc.testcontainers/ryuk:0.7.0 : Pulling image layers: 0 pending, 0 downloaded, 0 extracted, (0 bytes/0 bytes) 2024-09-26T23:00:23.190+02:00 INFO 59282 --- [tream-516338723] tc.testcontainers/ryuk:0.7.0 : Pulling image layers: 2 pending, 1 downloaded, 0 extracted, (307 KB/? MB) 2024-09-26T23:00:23.283+02:00 INFO 59282 --- [tream-516338723] tc.testcontainers/ryuk:0.7.0 : Pulling image layers: 1 pending, 2 downloaded, 0 extracted, (1 MB/? MB) 2024-09-26T23:00:23.284+02:00 INFO 59282 --- [tream-516338723] tc.testcontainers/ryuk:0.7.0 : Pulling image layers: 1 pending, 2 downloaded, 1 extracted, (1 MB/? MB) 2024-09-26T23:00:23.325+02:00 INFO 59282 --- [tream-516338723] tc.testcontainers/ryuk:0.7.0 : Pulling image layers: 1 pending, 2 downloaded, 2 extracted, (2 MB/? MB) 2024-09-26T23:00:23.330+02:00 INFO 59282 --- [tream-516338723] tc.testcontainers/ryuk:0.7.0 : Pull complete. 3 layers, pulled in 1s (downloaded 2 MB at 2 MB/s) 2024-09-26T23:00:23.330+02:00 INFO 59282 --- [ prefetching-1] tc.testcontainers/ryuk:0.7.0 : Image testcontainers/ryuk:0.7.0 pull took PT3.319347S 2024-09-26T23:00:23.343+02:00 INFO 59282 --- [ prefetching-1] tc.testcontainers/ryuk:0.7.0 : Creating container for image: testcontainers/ryuk:0.7.0 2024-09-26T23:00:23.402+02:00 INFO 59282 --- [ prefetching-1] tc.testcontainers/ryuk:0.7.0 : Container testcontainers/ryuk:0.7.0 is starting: 0c9b8159bbeee46cd52f1c9328b488d09e5603f0d4e003635699f07d4c9b2e9e 2024-09-26T23:00:23.566+02:00 INFO 59282 --- [ prefetching-1] tc.testcontainers/ryuk:0.7.0 : Container testcontainers/ryuk:0.7.0 started in PT0.223508S 2024-09-26T23:00:23.568+02:00 WARN 59282 --- [containers-ryuk] o.t.utility.RyukResourceReaper : Can not connect to Ryuk at localhost:32873 java.net.ConnectException: Connection refused at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:547) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:633) at org.testcontainers.utility.RyukResourceReaper.lambda$null$1(RyukResourceReaper.java:105) at org.rnorth.ducttape.ratelimits.RateLimiter.doWhenReady(RateLimiter.java:27) at org.testcontainers.utility.RyukResourceReaper.lambda$maybeStart$2(RyukResourceReaper.java:101) at java.base/java.lang.Thread.run(Thread.java:840) 2024-09-26T23:00:23.820+02:00 WARN 59282 --- [containers-ryuk] o.t.utility.RyukResourceReaper : Can not connect to Ryuk at localhost:32873 java.net.ConnectException: Connection refused at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:554) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:633) at org.testcontainers.utility.RyukResourceReaper.lambda$null$1(RyukResourceReaper.java:105) at org.rnorth.ducttape.ratelimits.RateLimiter.doWhenReady(RateLimiter.java:27) at org.testcontainers.utility.RyukResourceReaper.lambda$maybeStart$2(RyukResourceReaper.java:101) at java.base/java.lang.Thread.run(Thread.java:840) 2024-09-26T23:00:24.073+02:00 WARN 59282 --- [containers-ryuk] o.t.utility.RyukResourceReaper : Can not connect to Ryuk at localhost:32873 java.net.ConnectException: Connection refused at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:554) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:633) at org.testcontainers.utility.RyukResourceReaper.lambda$null$1(RyukResourceReaper.java:105) at org.rnorth.ducttape.ratelimits.RateLimiter.doWhenReady(RateLimiter.java:27) at org.testcontainers.utility.RyukResourceReaper.lambda$maybeStart$2(RyukResourceReaper.java:101) at java.base/java.lang.Thread.run(Thread.java:840) 2024-09-26T23:00:24.327+02:00 WARN 59282 --- [containers-ryuk] o.t.utility.RyukResourceReaper : Can not connect to Ryuk at localhost:32873 java.net.ConnectException: Connection refused at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:554) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:633) at org.testcontainers.utility.RyukResourceReaper.lambda$null$1(RyukResourceReaper.java:105) at org.rnorth.ducttape.ratelimits.RateLimiter.doWhenReady(RateLimiter.java:27) at org.testcontainers.utility.RyukResourceReaper.lambda$maybeStart$2(RyukResourceReaper.java:101) at java.base/java.lang.Thread.run(Thread.java:840) 2024-09-26T23:00:24.582+02:00 WARN 59282 --- [containers-ryuk] o.t.utility.RyukResourceReaper : Can not connect to Ryuk at localhost:32873 java.net.ConnectException: Connection refused at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:554) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:633) at org.testcontainers.utility.RyukResourceReaper.lambda$null$1(RyukResourceReaper.java:105) at org.rnorth.ducttape.ratelimits.RateLimiter.doWhenReady(RateLimiter.java:27) at org.testcontainers.utility.RyukResourceReaper.lambda$maybeStart$2(RyukResourceReaper.java:101) at java.base/java.lang.Thread.run(Thread.java:840) 2024-09-26T23:00:24.834+02:00 WARN 59282 --- [containers-ryuk] o.t.utility.RyukResourceReaper : Can not connect to Ryuk at localhost:32873 java.net.ConnectException: Connection refused at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:554) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:633) at org.testcontainers.utility.RyukResourceReaper.lambda$null$1(RyukResourceReaper.java:105) at org.rnorth.ducttape.ratelimits.RateLimiter.doWhenReady(RateLimiter.java:27) at org.testcontainers.utility.RyukResourceReaper.lambda$maybeStart$2(RyukResourceReaper.java:101) at java.base/java.lang.Thread.run(Thread.java:840) 2024-09-26T23:00:25.089+02:00 WARN 59282 --- [containers-ryuk] o.t.utility.RyukResourceReaper : Can not connect to Ryuk at localhost:32873 java.net.ConnectException: Connection refused at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:554) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:633) at org.testcontainers.utility.RyukResourceReaper.lambda$null$1(RyukResourceReaper.java:105) at org.rnorth.ducttape.ratelimits.RateLimiter.doWhenReady(RateLimiter.java:27) at org.testcontainers.utility.RyukResourceReaper.lambda$maybeStart$2(RyukResourceReaper.java:101) at java.base/java.lang.Thread.run(Thread.java:840) 2024-09-26T23:00:25.345+02:00 WARN 59282 --- [containers-ryuk] o.t.utility.RyukResourceReaper : Can not connect to Ryuk at localhost:32873 java.net.ConnectException: Connection refused at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:554) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:633) at org.testcontainers.utility.RyukResourceReaper.lambda$null$1(RyukResourceReaper.java:105) at org.rnorth.ducttape.ratelimits.RateLimiter.doWhenReady(RateLimiter.java:27) at org.testcontainers.utility.RyukResourceReaper.lambda$maybeStart$2(RyukResourceReaper.java:101) at java.base/java.lang.Thread.run(Thread.java:840) 2024-09-26T23:00:25.599+02:00 WARN 59282 --- [containers-ryuk] o.t.utility.RyukResourceReaper : Can not connect to Ryuk at localhost:32873 java.net.ConnectException: Connection refused at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:554) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:633) at org.testcontainers.utility.RyukResourceReaper.lambda$null$1(RyukResourceReaper.java:105) at org.rnorth.ducttape.ratelimits.RateLimiter.doWhenReady(RateLimiter.java:27) at org.testcontainers.utility.RyukResourceReaper.lambda$maybeStart$2(RyukResourceReaper.java:101) at java.base/java.lang.Thread.run(Thread.java:840) 2024-09-26T23:00:25.855+02:00 WARN 59282 --- [containers-ryuk] o.t.utility.RyukResourceReaper : Can not connect to Ryuk at localhost:32873 java.net.ConnectException: Connection refused at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:554) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:633) at org.testcontainers.utility.RyukResourceReaper.lambda$null$1(RyukResourceReaper.java:105) at org.rnorth.ducttape.ratelimits.RateLimiter.doWhenReady(RateLimiter.java:27) at org.testcontainers.utility.RyukResourceReaper.lambda$maybeStart$2(RyukResourceReaper.java:101) at java.base/java.lang.Thread.run(Thread.java:840) 2024-09-26T23:00:26.112+02:00 WARN 59282 --- [containers-ryuk] o.t.utility.RyukResourceReaper : Can not connect to Ryuk at localhost:32873 java.net.ConnectException: Connection refused at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:554) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:633) at org.testcontainers.utility.RyukResourceReaper.lambda$null$1(RyukResourceReaper.java:105) at org.rnorth.ducttape.ratelimits.RateLimiter.doWhenReady(RateLimiter.java:27) at org.testcontainers.utility.RyukResourceReaper.lambda$maybeStart$2(RyukResourceReaper.java:101) at java.base/java.lang.Thread.run(Thread.java:840) 2024-09-26T23:00:26.372+02:00 INFO 59282 --- [ prefetching-1] o.t.utility.RyukResourceReaper : Ryuk started - will monitor and terminate Testcontainers containers on JVM exit 2024-09-26T23:00:26.375+02:00 INFO 59282 --- [ prefetching-1] org.testcontainers.DockerClientFactory : Checking the system... 2024-09-26T23:00:26.376+02:00 INFO 59282 --- [ prefetching-1] org.testcontainers.DockerClientFactory : ✔︎ Docker server version should be at least 1.6.0 2024-09-26T23:00:26.380+02:00 INFO 59282 --- [ prefetching-1] tc.postgres:16-alpine : Pulling docker image: postgres:16-alpine. Please be patient; this may take some time but only needs to be done once. 2024-09-26T23:00:28.104+02:00 INFO 59282 --- [ream-1955759802] tc.postgres:16-alpine : Starting to pull image 2024-09-26T23:00:28.108+02:00 INFO 59282 --- [ream-1955759802] tc.postgres:16-alpine : Pulling image layers: 0 pending, 0 downloaded, 0 extracted, (0 bytes/0 bytes) 2024-09-26T23:00:29.313+02:00 INFO 59282 --- [ream-1955759802] tc.postgres:16-alpine : Pulling image layers: 10 pending, 1 downloaded, 0 extracted, (9 KB/? MB) 2024-09-26T23:00:29.335+02:00 INFO 59282 --- [ream-1955759802] tc.postgres:16-alpine : Pulling image layers: 9 pending, 2 downloaded, 0 extracted, (9 KB/? MB) 2024-09-26T23:00:30.159+02:00 INFO 59282 --- [ream-1955759802] tc.postgres:16-alpine : Pulling image layers: 8 pending, 3 downloaded, 0 extracted, (18 MB/? MB) 2024-09-26T23:00:30.235+02:00 INFO 59282 --- [ream-1955759802] tc.postgres:16-alpine : Pulling image layers: 7 pending, 4 downloaded, 0 extracted, (22 MB/? MB) 2024-09-26T23:00:32.389+02:00 INFO 59282 --- [ream-1955759802] tc.postgres:16-alpine : Pulling image layers: 6 pending, 5 downloaded, 0 extracted, (86 MB/? MB) 2024-09-26T23:00:33.881+02:00 INFO 59282 --- [ream-1955759802] tc.postgres:16-alpine : Pulling image layers: 6 pending, 5 downloaded, 1 extracted, (86 MB/? MB) 2024-09-26T23:00:33.886+02:00 INFO 59282 --- [ream-1955759802] tc.postgres:16-alpine : Pulling image layers: 6 pending, 5 downloaded, 2 extracted, (86 MB/? MB) 2024-09-26T23:00:33.892+02:00 INFO 59282 --- [ream-1955759802] tc.postgres:16-alpine : Pulling image layers: 6 pending, 5 downloaded, 3 extracted, (86 MB/? MB) 2024-09-26T23:00:33.901+02:00 INFO 59282 --- [ream-1955759802] tc.postgres:16-alpine : Pulling image layers: 6 pending, 5 downloaded, 4 extracted, (86 MB/? MB) 2024-09-26T23:00:33.907+02:00 INFO 59282 --- [ream-1955759802] tc.postgres:16-alpine : Pulling image layers: 6 pending, 5 downloaded, 5 extracted, (86 MB/? MB) 2024-09-26T23:00:33.912+02:00 INFO 59282 --- [ream-1955759802] tc.postgres:16-alpine : Pulling image layers: 6 pending, 5 downloaded, 6 extracted, (86 MB/? MB) 2024-09-26T23:00:33.916+02:00 INFO 59282 --- [ream-1955759802] tc.postgres:16-alpine : Pull complete. 11 layers, pulled in 5s (downloaded 86 MB at 17 MB/s) 2024-09-26T23:00:33.917+02:00 INFO 59282 --- [ prefetching-1] tc.postgres:16-alpine : Image postgres:16-alpine pull took PT7.536989S 2024-09-26T23:00:33.920+02:00 INFO 59282 --- [ prefetching-1] tc.postgres:16-alpine : Creating container for image: postgres:16-alpine 2024-09-26T23:00:34.087+02:00 INFO 59282 --- [ prefetching-1] tc.postgres:16-alpine : Container postgres:16-alpine is starting: 50b1dcc3b3dcee9a9ddc4199b7bb6a52ec6854bb2e21ef74978ba064c497436a 2024-09-26T23:00:34.874+02:00 INFO 59282 --- [ prefetching-1] tc.postgres:16-alpine : Container postgres:16-alpine started in PT0.953889S 2024-09-26T23:00:34.876+02:00 INFO 59282 --- [ prefetching-1] tc.postgres:16-alpine : Container is started (JDBC URL: jdbc:postgresql://localhost:32874/test?loggerLevel=OFF) 2024-09-26T23:00:34.881+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: The files belonging to this database system will be owned by user "postgres". 2024-09-26T23:00:34.881+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: This user must also own the server process. 2024-09-26T23:00:34.881+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26T23:00:34.881+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: The database cluster will be initialized with locale "en_US.utf8". 2024-09-26T23:00:34.881+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: The default database encoding has accordingly been set to "UTF8". 2024-09-26T23:00:34.881+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: The default text search configuration will be set to "english". 2024-09-26T23:00:34.881+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26T23:00:34.881+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: Data page checksums are disabled. 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: fixing permissions on existing directory /var/lib/postgresql/data ... ok 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: creating subdirectories ... ok 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: selecting dynamic shared memory implementation ... posix 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: selecting default max_connections ... 100 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: selecting default shared_buffers ... 128MB 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: selecting default time zone ... UTC 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: creating configuration files ... ok 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: running bootstrap script ... ok 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDERR: sh: locale: not found 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDERR: 2024-09-26 21:00:34.437 UTC [36] WARNING: no usable system locales were found 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDERR: initdb: warning: enabling "trust" authentication for local connections 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDERR: initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: performing post-bootstrap initialization ... ok 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: Sync to disk skipped. 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: The data directory might become corrupt if the operating system crashes. 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26T23:00:34.882+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26T23:00:34.883+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: Success. You can now start the database server using: 2024-09-26T23:00:34.883+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26T23:00:34.883+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: pg_ctl -D /var/lib/postgresql/data -l logfile start 2024-09-26T23:00:34.883+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26T23:00:34.883+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: waiting for server to start....2024-09-26 21:00:34.634 UTC [42] LOG: starting PostgreSQL 16.4 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309, 64-bit 2024-09-26T23:00:34.883+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26 21:00:34.634 UTC [42] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2024-09-26T23:00:34.883+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26 21:00:34.635 UTC [45] LOG: database system was shut down at 2024-09-26 21:00:34 UTC 2024-09-26T23:00:34.883+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26 21:00:34.636 UTC [42] LOG: database system is ready to accept connections 2024-09-26T23:00:34.883+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: done 2024-09-26T23:00:34.883+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: server started 2024-09-26T23:00:34.883+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: CREATE DATABASE 2024-09-26T23:00:34.883+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26T23:00:34.883+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26T23:00:34.883+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/* 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26 21:00:34.765 UTC [42] LOG: received fast shutdown request 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26 21:00:34.765 UTC [42] LOG: aborting any active transactions 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26 21:00:34.767 UTC [42] LOG: background worker "logical replication launcher" (PID 48) exited with exit code 1 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: waiting for server to shut down....2024-09-26 21:00:34.767 UTC [43] LOG: shutting down 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26 21:00:34.767 UTC [43] LOG: checkpoint starting: shutdown immediate 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26 21:00:34.773 UTC [43] LOG: checkpoint complete: wrote 924 buffers (5.6%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.006 s, sync=0.001 s, total=0.006 s; sync files=0, longest=0.000 s, average=0.000 s; distance=4266 kB, estimate=4266 kB; lsn=0/191A7D8, redo lsn=0/191A7D8 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26 21:00:34.776 UTC [42] LOG: database system is shut down 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: done 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: server stopped 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: PostgreSQL init process complete; ready for start up. 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDOUT: 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDERR: 2024-09-26 21:00:34.884 UTC [1] LOG: starting PostgreSQL 16.4 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309, 64-bit 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDERR: 2024-09-26 21:00:34.884 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDERR: 2024-09-26 21:00:34.884 UTC [1] LOG: listening on IPv6 address "::", port 5432 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDERR: 2024-09-26 21:00:34.884 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDERR: 2024-09-26 21:00:34.886 UTC [58] LOG: database system was shut down at 2024-09-26 21:00:34 UTC 2024-09-26T23:00:34.884+02:00 INFO 59282 --- [ream-1506584853] z.t.d.p.p.DockerPostgresDatabaseProvider : STDERR: 2024-09-26 21:00:34.888 UTC [1] LOG: database system is ready to accept connections 2024-09-26T23:00:34.905+02:00 WARN 59282 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception with message: io.zonky.test.db.provider.ProviderException: Unexpected error when creating a database 2024-09-26T23:00:34.908+02:00 INFO 59282 --- [ main] .s.b.a.l.ConditionEvaluationReportLogger : Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2024-09-26T23:00:34.917+02:00 ERROR 59282 --- [ main] o.s.boot.SpringApplication : Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception with message: io.zonky.test.db.provider.ProviderException: Unexpected error when creating a database at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:648) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1355) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1185) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:205) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:954) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:625) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) at org.springframework.boot.SpringApplication.run(SpringApplication.java:335) at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137) at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1463) at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:553) at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137) at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:225) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130) at io.zonky.test.db.EmbeddedDatabaseTestExecutionListener.forEachDatabase(EmbeddedDatabaseTestExecutionListener.java:90) at io.zonky.test.db.EmbeddedDatabaseTestExecutionListener.resetDatabases(EmbeddedDatabaseTestExecutionListener.java:58) at io.zonky.test.db.EmbeddedDatabaseTestExecutionListener.beforeTestClass(EmbeddedDatabaseTestExecutionListener.java:34) at org.springframework.test.context.TestContextManager.beforeTestClass(TestContextManager.java:220) at org.springframework.test.context.junit.jupiter.SpringExtension.beforeAll(SpringExtension.java:133) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$12(ClassBasedTestDescriptor.java:396) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:396) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:212) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:85) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:198) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:169) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:93) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:58) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:141) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:57) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:103) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:85) at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47) at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:63) at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57) at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55) Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception with message: io.zonky.test.db.provider.ProviderException: Unexpected error when creating a database at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:178) at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644) ... 71 common frames omitted Caused by: io.zonky.test.db.shaded.com.google.common.util.concurrent.UncheckedExecutionException: io.zonky.test.db.provider.ProviderException: Unexpected error when creating a database at io.zonky.test.db.shaded.com.google.common.util.concurrent.Futures.wrapAndThrowUnchecked(Futures.java:1546) at io.zonky.test.db.shaded.com.google.common.util.concurrent.Futures.getUnchecked(Futures.java:1532) at io.zonky.test.db.context.DefaultDatabaseContext.awaitDatabase(DefaultDatabaseContext.java:282) at io.zonky.test.db.context.DefaultDatabaseContext.getDatabase(DefaultDatabaseContext.java:126) at io.zonky.test.db.context.DatabaseTargetSource.getTarget(DatabaseTargetSource.java:32) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:203) at jdk.proxy2/jdk.proxy2.$Proxy76.getConnection(Unknown Source) at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:160) at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:118) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:81) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:342) at org.springframework.boot.jdbc.EmbeddedDatabaseConnection.isEmbedded(EmbeddedDatabaseConnection.java:168) at org.springframework.boot.autoconfigure.orm.jpa.HibernateDefaultDdlAutoProvider.getDefaultDdlAuto(HibernateDefaultDdlAutoProvider.java:42) at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration.lambda$getVendorProperties$1(HibernateJpaConfiguration.java:142) at org.springframework.boot.autoconfigure.orm.jpa.HibernateSettings.getDdlAuto(HibernateSettings.java:41) at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.determineDdlAuto(HibernateProperties.java:118) at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.getAdditionalProperties(HibernateProperties.java:87) at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.determineHibernateProperties(HibernateProperties.java:80) at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration.getVendorProperties(HibernateJpaConfiguration.java:143) at org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.entityManagerFactory(JpaBaseConfiguration.java:134) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:569) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:146) ... 72 common frames omitted Caused by: io.zonky.test.db.provider.ProviderException: Unexpected error when creating a database at io.zonky.test.db.provider.postgres.DockerPostgresDatabaseProvider.createDatabase(DockerPostgresDatabaseProvider.java:119) at io.zonky.test.db.provider.postgres.DockerPostgresDatabaseProvider.createTemplate(DockerPostgresDatabaseProvider.java:102) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider.createTemplate(TemplatingDatabaseProvider.java:129) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider.lambda$createTemplateIfPossible$1(TemplatingDatabaseProvider.java:171) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider$TemplateWrapper.loadTemplate(TemplatingDatabaseProvider.java:294) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider$TemplateWrapper.access$200(TemplatingDatabaseProvider.java:224) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider.createTemplateIfPossible(TemplatingDatabaseProvider.java:171) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider.createDatabase(TemplatingDatabaseProvider.java:112) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider.createDatabase(TemplatingDatabaseProvider.java:104) at io.zonky.test.db.provider.common.PrefetchingDatabaseProvider$PrefetchingTask.lambda$forPreparer$0(PrefetchingDatabaseProvider.java:391) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at io.zonky.test.db.provider.common.PrefetchingDatabaseProvider$PrefetchingTask.run(PrefetchingDatabaseProvider.java:420) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840) Caused by: org.postgresql.util.PSQLException: Connection to localhost:32874 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:346) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:54) at org.postgresql.jdbc.PgConnection.(PgConnection.java:273) at org.postgresql.Driver.makeConnection(Driver.java:446) at org.postgresql.Driver.connect(Driver.java:298) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:229) at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:104) at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:88) at io.zonky.test.db.provider.support.AbstractEmbeddedDatabase.getConnection(AbstractEmbeddedDatabase.java:24) at io.zonky.test.db.provider.support.BlockingDatabaseWrapper.getConnection(BlockingDatabaseWrapper.java:61) at io.zonky.test.db.provider.postgres.DockerPostgresDatabaseProvider$DatabaseInstance.executeStatement(DockerPostgresDatabaseProvider.java:241) at io.zonky.test.db.provider.postgres.DockerPostgresDatabaseProvider$DatabaseInstance.createDatabase(DockerPostgresDatabaseProvider.java:208) at io.zonky.test.db.provider.postgres.DockerPostgresDatabaseProvider.createDatabase(DockerPostgresDatabaseProvider.java:114) ... 14 common frames omitted Caused by: java.net.ConnectException: Connection refused at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:554) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:633) at org.postgresql.core.PGStream.createSocket(PGStream.java:243) at org.postgresql.core.PGStream.(PGStream.java:98) at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:136) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:262) ... 27 common frames omitted ============================ CONDITIONS EVALUATION REPORT ============================ Positive matches: ----------------- None Negative matches: ----------------- None Exclusions: ----------- None Unconditional classes: ---------------------- None 2024-09-26T23:00:34.921+02:00 WARN 59282 --- [ main] o.s.test.context.TestContextManager : Caught exception while invoking 'beforeTestClass' callback on TestExecutionListener [io.zonky.test.db.EmbeddedDatabaseTestExecutionListener] for test class [com.github.tomix26.embedded.database.demo.CustomDataJpaAnnotationTest] java.lang.IllegalStateException: Failed to load ApplicationContext for [MergedContextConfiguration@1f4f0fcc testClass = com.github.tomix26.embedded.database.demo.CustomDataJpaAnnotationTest, locations = [], classes = [com.github.tomix26.embedded.database.demo.DemoApplication], contextInitializerClasses = [], activeProfiles = [], propertySourceDescriptors = [], propertySourceProperties = ["org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTestContextBootstrapper=true"], contextCustomizers = [[ImportsContextCustomizer@46c10083 key = [org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration, org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration, org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManagerAutoConfiguration, org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration, org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, org.springframework.boot.autoconfigure.sql.init.SqlInitializationAutoConfiguration, org.springframework.boot.test.autoconfigure.jdbc.TestDatabaseAutoConfiguration, org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration, org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration, org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration, org.springframework.boot.autoconfigure.jdbc.JdbcClientAutoConfiguration, org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration]], org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@34cdeda2, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@4535b6d5, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.autoconfigure.OverrideAutoConfigurationContextCustomizerFactory$DisableAutoConfigurationContextCustomizer@373ebf74, org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.filter.TypeExcludeFiltersContextCustomizer@34be3d80, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@658dea8, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizer@45815ffc, io.zonky.test.db.EmbeddedDatabaseContextCustomizerFactory$EmbeddedDatabaseContextCustomizer@c92c592, org.springframework.boot.test.context.SpringBootTestAnnotation@91a79de9], contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, parent = null] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:180) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130) at io.zonky.test.db.EmbeddedDatabaseTestExecutionListener.forEachDatabase(EmbeddedDatabaseTestExecutionListener.java:90) at io.zonky.test.db.EmbeddedDatabaseTestExecutionListener.resetDatabases(EmbeddedDatabaseTestExecutionListener.java:58) at io.zonky.test.db.EmbeddedDatabaseTestExecutionListener.beforeTestClass(EmbeddedDatabaseTestExecutionListener.java:34) at org.springframework.test.context.TestContextManager.beforeTestClass(TestContextManager.java:220) at org.springframework.test.context.junit.jupiter.SpringExtension.beforeAll(SpringExtension.java:133) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$12(ClassBasedTestDescriptor.java:396) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:396) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:212) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:85) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:198) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:169) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:93) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:58) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:141) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:57) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:103) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:85) at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47) at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:63) at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57) at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception with message: io.zonky.test.db.provider.ProviderException: Unexpected error when creating a database at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:648) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1355) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1185) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:205) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:954) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:625) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) at org.springframework.boot.SpringApplication.run(SpringApplication.java:335) at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137) at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1463) at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:553) at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137) at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:225) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152) ... 48 common frames omitted Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception with message: io.zonky.test.db.provider.ProviderException: Unexpected error when creating a database at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:178) at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644) ... 71 common frames omitted Caused by: io.zonky.test.db.shaded.com.google.common.util.concurrent.UncheckedExecutionException: io.zonky.test.db.provider.ProviderException: Unexpected error when creating a database at io.zonky.test.db.shaded.com.google.common.util.concurrent.Futures.wrapAndThrowUnchecked(Futures.java:1546) at io.zonky.test.db.shaded.com.google.common.util.concurrent.Futures.getUnchecked(Futures.java:1532) at io.zonky.test.db.context.DefaultDatabaseContext.awaitDatabase(DefaultDatabaseContext.java:282) at io.zonky.test.db.context.DefaultDatabaseContext.getDatabase(DefaultDatabaseContext.java:126) at io.zonky.test.db.context.DatabaseTargetSource.getTarget(DatabaseTargetSource.java:32) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:203) at jdk.proxy2/jdk.proxy2.$Proxy76.getConnection(Unknown Source) at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:160) at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:118) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:81) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:342) at org.springframework.boot.jdbc.EmbeddedDatabaseConnection.isEmbedded(EmbeddedDatabaseConnection.java:168) at org.springframework.boot.autoconfigure.orm.jpa.HibernateDefaultDdlAutoProvider.getDefaultDdlAuto(HibernateDefaultDdlAutoProvider.java:42) at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration.lambda$getVendorProperties$1(HibernateJpaConfiguration.java:142) at org.springframework.boot.autoconfigure.orm.jpa.HibernateSettings.getDdlAuto(HibernateSettings.java:41) at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.determineDdlAuto(HibernateProperties.java:118) at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.getAdditionalProperties(HibernateProperties.java:87) at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.determineHibernateProperties(HibernateProperties.java:80) at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration.getVendorProperties(HibernateJpaConfiguration.java:143) at org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.entityManagerFactory(JpaBaseConfiguration.java:134) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:569) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:146) ... 72 common frames omitted Caused by: io.zonky.test.db.provider.ProviderException: Unexpected error when creating a database at io.zonky.test.db.provider.postgres.DockerPostgresDatabaseProvider.createDatabase(DockerPostgresDatabaseProvider.java:119) at io.zonky.test.db.provider.postgres.DockerPostgresDatabaseProvider.createTemplate(DockerPostgresDatabaseProvider.java:102) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider.createTemplate(TemplatingDatabaseProvider.java:129) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider.lambda$createTemplateIfPossible$1(TemplatingDatabaseProvider.java:171) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider$TemplateWrapper.loadTemplate(TemplatingDatabaseProvider.java:294) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider$TemplateWrapper.access$200(TemplatingDatabaseProvider.java:224) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider.createTemplateIfPossible(TemplatingDatabaseProvider.java:171) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider.createDatabase(TemplatingDatabaseProvider.java:112) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider.createDatabase(TemplatingDatabaseProvider.java:104) at io.zonky.test.db.provider.common.PrefetchingDatabaseProvider$PrefetchingTask.lambda$forPreparer$0(PrefetchingDatabaseProvider.java:391) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at io.zonky.test.db.provider.common.PrefetchingDatabaseProvider$PrefetchingTask.run(PrefetchingDatabaseProvider.java:420) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840) Caused by: org.postgresql.util.PSQLException: Connection to localhost:32874 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:346) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:54) at org.postgresql.jdbc.PgConnection.(PgConnection.java:273) at org.postgresql.Driver.makeConnection(Driver.java:446) at org.postgresql.Driver.connect(Driver.java:298) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:229) at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:104) at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:88) at io.zonky.test.db.provider.support.AbstractEmbeddedDatabase.getConnection(AbstractEmbeddedDatabase.java:24) at io.zonky.test.db.provider.support.BlockingDatabaseWrapper.getConnection(BlockingDatabaseWrapper.java:61) at io.zonky.test.db.provider.postgres.DockerPostgresDatabaseProvider$DatabaseInstance.executeStatement(DockerPostgresDatabaseProvider.java:241) at io.zonky.test.db.provider.postgres.DockerPostgresDatabaseProvider$DatabaseInstance.createDatabase(DockerPostgresDatabaseProvider.java:208) at io.zonky.test.db.provider.postgres.DockerPostgresDatabaseProvider.createDatabase(DockerPostgresDatabaseProvider.java:114) ... 14 common frames omitted Caused by: java.net.ConnectException: Connection refused at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:554) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:633) at org.postgresql.core.PGStream.createSocket(PGStream.java:243) at org.postgresql.core.PGStream.(PGStream.java:98) at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:136) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:262) ... 27 common frames omitted 2024-09-26T23:00:34.925+02:00 WARN 59282 --- [ main] o.s.test.context.TestContextManager : Caught exception while invoking 'afterTestClass' callback on TestExecutionListener [io.zonky.test.db.EmbeddedDatabaseTestExecutionListener] for test class [com.github.tomix26.embedded.database.demo.CustomDataJpaAnnotationTest] java.lang.IllegalStateException: ApplicationContext failure threshold (1) exceeded: skipping repeated attempt to load context for [MergedContextConfiguration@1f4f0fcc testClass = com.github.tomix26.embedded.database.demo.CustomDataJpaAnnotationTest, locations = [], classes = [com.github.tomix26.embedded.database.demo.DemoApplication], contextInitializerClasses = [], activeProfiles = [], propertySourceDescriptors = [], propertySourceProperties = ["org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTestContextBootstrapper=true"], contextCustomizers = [[ImportsContextCustomizer@46c10083 key = [org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration, org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration, org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManagerAutoConfiguration, org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration, org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, org.springframework.boot.autoconfigure.sql.init.SqlInitializationAutoConfiguration, org.springframework.boot.test.autoconfigure.jdbc.TestDatabaseAutoConfiguration, org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration, org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration, org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration, org.springframework.boot.autoconfigure.jdbc.JdbcClientAutoConfiguration, org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration]], org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@34cdeda2, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@4535b6d5, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.autoconfigure.OverrideAutoConfigurationContextCustomizerFactory$DisableAutoConfigurationContextCustomizer@373ebf74, org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.filter.TypeExcludeFiltersContextCustomizer@34be3d80, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@658dea8, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizer@45815ffc, io.zonky.test.db.EmbeddedDatabaseContextCustomizerFactory$EmbeddedDatabaseContextCustomizer@c92c592, org.springframework.boot.test.context.SpringBootTestAnnotation@91a79de9], contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, parent = null] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:145) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130) at io.zonky.test.db.EmbeddedDatabaseTestExecutionListener.forEachDatabase(EmbeddedDatabaseTestExecutionListener.java:90) at io.zonky.test.db.EmbeddedDatabaseTestExecutionListener.resetDatabases(EmbeddedDatabaseTestExecutionListener.java:58) at io.zonky.test.db.EmbeddedDatabaseTestExecutionListener.afterTestClass(EmbeddedDatabaseTestExecutionListener.java:54) at org.springframework.test.context.TestContextManager.afterTestClass(TestContextManager.java:538) at org.springframework.test.context.junit.jupiter.SpringExtension.afterAll(SpringExtension.java:144) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeAfterAllCallbacks$18(ClassBasedTestDescriptor.java:462) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeAfterAllCallbacks$19(ClassBasedTestDescriptor.java:462) at org.junit.platform.commons.util.CollectionUtils.forEachInReverseOrder(CollectionUtils.java:217) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeAfterAllCallbacks(ClassBasedTestDescriptor.java:461) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.after(ClassBasedTestDescriptor.java:236) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.after(ClassBasedTestDescriptor.java:85) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:161) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:161) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:198) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:169) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:93) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:58) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:141) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:57) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:103) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:85) at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47) at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:63) at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57) at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55) java.lang.IllegalStateException: Failed to load ApplicationContext for [MergedContextConfiguration@1f4f0fcc testClass = com.github.tomix26.embedded.database.demo.CustomDataJpaAnnotationTest, locations = [], classes = [com.github.tomix26.embedded.database.demo.DemoApplication], contextInitializerClasses = [], activeProfiles = [], propertySourceDescriptors = [], propertySourceProperties = ["org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTestContextBootstrapper=true"], contextCustomizers = [[ImportsContextCustomizer@46c10083 key = [org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration, org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration, org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManagerAutoConfiguration, org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration, org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, org.springframework.boot.autoconfigure.sql.init.SqlInitializationAutoConfiguration, org.springframework.boot.test.autoconfigure.jdbc.TestDatabaseAutoConfiguration, org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration, org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration, org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration, org.springframework.boot.autoconfigure.jdbc.JdbcClientAutoConfiguration, org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration]], org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@34cdeda2, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@4535b6d5, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.autoconfigure.OverrideAutoConfigurationContextCustomizerFactory$DisableAutoConfigurationContextCustomizer@373ebf74, org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.filter.TypeExcludeFiltersContextCustomizer@34be3d80, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@658dea8, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizer@45815ffc, io.zonky.test.db.EmbeddedDatabaseContextCustomizerFactory$EmbeddedDatabaseContextCustomizer@c92c592, org.springframework.boot.test.context.SpringBootTestAnnotation@91a79de9], contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, parent = null] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:180) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130) at io.zonky.test.db.EmbeddedDatabaseTestExecutionListener.forEachDatabase(EmbeddedDatabaseTestExecutionListener.java:90) at io.zonky.test.db.EmbeddedDatabaseTestExecutionListener.resetDatabases(EmbeddedDatabaseTestExecutionListener.java:58) at io.zonky.test.db.EmbeddedDatabaseTestExecutionListener.beforeTestClass(EmbeddedDatabaseTestExecutionListener.java:34) at org.springframework.test.context.TestContextManager.beforeTestClass(TestContextManager.java:220) at org.springframework.test.context.junit.jupiter.SpringExtension.beforeAll(SpringExtension.java:133) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) Suppressed: java.lang.IllegalStateException: ApplicationContext failure threshold (1) exceeded: skipping repeated attempt to load context for [MergedContextConfiguration@1f4f0fcc testClass = com.github.tomix26.embedded.database.demo.CustomDataJpaAnnotationTest, locations = [], classes = [com.github.tomix26.embedded.database.demo.DemoApplication], contextInitializerClasses = [], activeProfiles = [], propertySourceDescriptors = [], propertySourceProperties = ["org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTestContextBootstrapper=true"], contextCustomizers = [[ImportsContextCustomizer@46c10083 key = [org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration, org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration, org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManagerAutoConfiguration, org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration, org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, org.springframework.boot.autoconfigure.sql.init.SqlInitializationAutoConfiguration, org.springframework.boot.test.autoconfigure.jdbc.TestDatabaseAutoConfiguration, org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration, org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration, org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration, org.springframework.boot.autoconfigure.jdbc.JdbcClientAutoConfiguration, org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration]], org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@34cdeda2, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@4535b6d5, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.autoconfigure.OverrideAutoConfigurationContextCustomizerFactory$DisableAutoConfigurationContextCustomizer@373ebf74, org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.filter.TypeExcludeFiltersContextCustomizer@34be3d80, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@658dea8, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizer@45815ffc, io.zonky.test.db.EmbeddedDatabaseContextCustomizerFactory$EmbeddedDatabaseContextCustomizer@c92c592, org.springframework.boot.test.context.SpringBootTestAnnotation@91a79de9], contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, parent = null] at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:145) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:130) at io.zonky.test.db.EmbeddedDatabaseTestExecutionListener.forEachDatabase(EmbeddedDatabaseTestExecutionListener.java:90) at io.zonky.test.db.EmbeddedDatabaseTestExecutionListener.resetDatabases(EmbeddedDatabaseTestExecutionListener.java:58) at io.zonky.test.db.EmbeddedDatabaseTestExecutionListener.afterTestClass(EmbeddedDatabaseTestExecutionListener.java:54) at org.springframework.test.context.TestContextManager.afterTestClass(TestContextManager.java:538) at org.springframework.test.context.junit.jupiter.SpringExtension.afterAll(SpringExtension.java:144) ... 1 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception with message: io.zonky.test.db.provider.ProviderException: Unexpected error when creating a database at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:648) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1355) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1185) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:205) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:954) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:625) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) at org.springframework.boot.SpringApplication.run(SpringApplication.java:335) at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$3(SpringBootContextLoader.java:137) at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1463) at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:553) at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:137) at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:108) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:225) at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:152) ... 7 more Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception with message: io.zonky.test.db.provider.ProviderException: Unexpected error when creating a database at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:178) at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644) ... 30 more Caused by: io.zonky.test.db.shaded.com.google.common.util.concurrent.UncheckedExecutionException: io.zonky.test.db.provider.ProviderException: Unexpected error when creating a database at io.zonky.test.db.shaded.com.google.common.util.concurrent.Futures.wrapAndThrowUnchecked(Futures.java:1546) at io.zonky.test.db.shaded.com.google.common.util.concurrent.Futures.getUnchecked(Futures.java:1532) at io.zonky.test.db.context.DefaultDatabaseContext.awaitDatabase(DefaultDatabaseContext.java:282) at io.zonky.test.db.context.DefaultDatabaseContext.getDatabase(DefaultDatabaseContext.java:126) at io.zonky.test.db.context.DatabaseTargetSource.getTarget(DatabaseTargetSource.java:32) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:203) at jdk.proxy2/jdk.proxy2.$Proxy76.getConnection(Unknown Source) at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:160) at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:118) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:81) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:342) at org.springframework.boot.jdbc.EmbeddedDatabaseConnection.isEmbedded(EmbeddedDatabaseConnection.java:168) at org.springframework.boot.autoconfigure.orm.jpa.HibernateDefaultDdlAutoProvider.getDefaultDdlAuto(HibernateDefaultDdlAutoProvider.java:42) at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration.lambda$getVendorProperties$1(HibernateJpaConfiguration.java:142) at org.springframework.boot.autoconfigure.orm.jpa.HibernateSettings.getDdlAuto(HibernateSettings.java:41) at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.determineDdlAuto(HibernateProperties.java:118) at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.getAdditionalProperties(HibernateProperties.java:87) at org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties.determineHibernateProperties(HibernateProperties.java:80) at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration.getVendorProperties(HibernateJpaConfiguration.java:143) at org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.entityManagerFactory(JpaBaseConfiguration.java:134) at java.base/java.lang.reflect.Method.invoke(Method.java:569) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:146) ... 31 more Caused by: io.zonky.test.db.provider.ProviderException: Unexpected error when creating a database at io.zonky.test.db.provider.postgres.DockerPostgresDatabaseProvider.createDatabase(DockerPostgresDatabaseProvider.java:119) at io.zonky.test.db.provider.postgres.DockerPostgresDatabaseProvider.createTemplate(DockerPostgresDatabaseProvider.java:102) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider.createTemplate(TemplatingDatabaseProvider.java:129) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider.lambda$createTemplateIfPossible$1(TemplatingDatabaseProvider.java:171) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider$TemplateWrapper.loadTemplate(TemplatingDatabaseProvider.java:294) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider$TemplateWrapper.access$200(TemplatingDatabaseProvider.java:224) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider.createTemplateIfPossible(TemplatingDatabaseProvider.java:171) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider.createDatabase(TemplatingDatabaseProvider.java:112) at io.zonky.test.db.provider.common.TemplatingDatabaseProvider.createDatabase(TemplatingDatabaseProvider.java:104) at io.zonky.test.db.provider.common.PrefetchingDatabaseProvider$PrefetchingTask.lambda$forPreparer$0(PrefetchingDatabaseProvider.java:391) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at io.zonky.test.db.provider.common.PrefetchingDatabaseProvider$PrefetchingTask.run(PrefetchingDatabaseProvider.java:420) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840) Caused by: org.postgresql.util.PSQLException: Connection to localhost:32874 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:346) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:54) at org.postgresql.jdbc.PgConnection.(PgConnection.java:273) at org.postgresql.Driver.makeConnection(Driver.java:446) at org.postgresql.Driver.connect(Driver.java:298) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:229) at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:104) at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:88) at io.zonky.test.db.provider.support.AbstractEmbeddedDatabase.getConnection(AbstractEmbeddedDatabase.java:24) at io.zonky.test.db.provider.support.BlockingDatabaseWrapper.getConnection(BlockingDatabaseWrapper.java:61) at io.zonky.test.db.provider.postgres.DockerPostgresDatabaseProvider$DatabaseInstance.executeStatement(DockerPostgresDatabaseProvider.java:241) at io.zonky.test.db.provider.postgres.DockerPostgresDatabaseProvider$DatabaseInstance.createDatabase(DockerPostgresDatabaseProvider.java:208) at io.zonky.test.db.provider.postgres.DockerPostgresDatabaseProvider.createDatabase(DockerPostgresDatabaseProvider.java:114) ... 14 more Caused by: java.net.ConnectException: Connection refused at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:554) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:633) at org.postgresql.core.PGStream.createSocket(PGStream.java:243) at org.postgresql.core.PGStream.(PGStream.java:98) at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:136) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:262) ... 27 more ```

I think the reason might be the system I am working on or the Docker engine I am using.

Here are my specs:

If I had to guess the issue probably occurs due to us not using the original Docker Engine.

Reverting to say Spring Boot 3.2.5 does not solve the issue - at least in my case (perhaps my case is a bit different?).

Wallman commented 1 month ago

We are successfully running it with Spring Boot 3.3 nowadays

tomix26 commented 1 month ago

I have just checked out the embedded-database-demo repository and am having the same issue the OP is having. I also have it on my other project.

Based on the logs you provided, it's apparent that the testcontainers library can't connect to the Docker containers. As you mentioned, the problem is likely caused by using a non-standard Docker engine. Here's a guide on how to resolve the issue: https://java.testcontainers.org/supported_docker_environment

If problems persist, please open a new separate issue. Because this is a completely different problem and isn't related to Spring Boot 3.3.

We are successfully running it with Spring Boot 3.3 nowadays

Thank you for the confirmation.

tomix26 commented 1 month ago

I'm closing this issue for now. I've tested Spring Boot 3.3 and haven't found any issues. The cause of the problem is likely in the integration with the Micrometer library. However, without a reproducer, I'm unable to solve the problem. Feel free to reopen this issue if you can provide more information, ideally a reproducer.