embedded-database-spring-test: macOs Big Sur: ERROR: checkpoint request failed
Getting Failed to load ApplicationContext when running multiple tests together after macOS update to Big Sur. When running just one test then everything usually works the first time after restarting the computer, but later the error starts to occur even with running just one test.
Caused by: org.postgresql.util.PSQLException: ERROR: checkpoint request failed at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2532) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2267) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:312) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:448) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:369) at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:153) at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:142) at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider$DatabaseInstance$DatabaseTemplate.executeStatement(ZonkyPostgresDatabaseProvider.java:163) at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider$DatabaseInstance$DatabaseTemplate.createDatabase(ZonkyPostgresDatabaseProvider.java:156) at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider.getDatabase(ZonkyPostgresDatabaseProvider.java:94) at io.zonky.test.db.provider.impl.PrefetchingDatabaseProvider$PrefetchingTask.lambda$new$0(PrefetchingDatabaseProvider.java:252) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at io.zonky.test.db.provider.impl.PrefetchingDatabaseProvider$PrefetchingTask.run(PrefetchingDatabaseProvider.java:259) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ... 1 more
Updated to 1.6.1 to resolve a different issue on Big Sur, but this one still remains.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 1
- Comments: 40
In my opinion, the best practice is to use Google …
I also have Eset and when real-time file system protection is disabled then the problem doesn’t seem to appear - as soon as it’s enabled then the issue occurs again.
Hit the same error on Big Sur. It looks like the wait for datasource isn’t working: I had one setup with ~7 tests of which the first 3 where failing. Depending on timing, sometimes all worked, sometimes not.
I created a git repo with a minimal setup for reproduction: https://github.com/dirkbolte/flyway_zonky
Here is my tested and working solution:
This is going to fix test running with embedded Postgres on your local. This will not impact your CI process because it will continue to use the default settings. Of course you have to take care of those settings if you have similar problems in that environment but definitely this will solve the problems transparently on your local development environment.
create or locate gradle.properties file in your project folder. Add this line.
systemProp.ot.epg.working-dir=/home/xxx/embedded-pgNote that, I did not test this suggestion yet. You can find more description about gradle.properties here: https://docs.gradle.org/current/userguide/build_environment.html
Maybe your antivirus performs some type of scan even after turning off the realtime shield. I’m just guessing, I can’t verify, I couldn’t reproduce the problem.
Is there anyone who doesn’t use antivirus at all and is facing with the same issues?
I have AVG. With ‘File Shield’ on it consistently fails with it off it consistently works!
Thanks very much for your investigation and insight @tomix26!