Closed sandra-thieme closed 2 years ago
This error means that you probably acquire a connection at the beginning of application or test start and hold it during the execution of multiple or all tests. The reason, why this is a problem, is that the library uses template databases for fast and cheap refreshing database content during tests. So databases are continuously created and released in a specific cycle. And the error above says that the current database cannot be released because there is still some active connection.
So please check your application or test logic to verify if there is some place that could hold a connection between execution of multiple tests.
Note that the function of the tests should not be affected. But it may cause the build machine to be slowed down or the memory to be run out.
I'm closing the issue due to inactivity, feel free to reopen it if the problem persists.
When executing tests that use the zonky postgres database it leads to a lot of messages like these:
Exception that is happening (with trace logging enabled):
We're using io.zonky.test:embedded-postgres version 1.3.1 and io.zonky.test:embedded-database-spring-test version 2.1.1 and the
@AutoConfigureEmbeddedDatabase
annotation. Do you have any idea what could be going wrong?