pkubowicz / mongock5-springboot-test

Reproduces a problem in executing tests with Mongock 5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to test migrations written using Mongock? Here is an example, but it does not work with Mongock 5. Mongock 4 works fine.

To reproduce run:

./gradlew check

Result:

2022-03-02 20:20:52.237 ERROR 81672 --- [    Test worker] i.m.r.core.executor.MongockRunnerImpl    : Mongock did not acquire process lock. EXITING WITHOUT RUNNING DATA MIGRATION

io.mongock.driver.api.lock.LockCheckException: Lock cannot be acquired after being cancelled
	at io.mongock.driver.core.lock.LockManagerDefault.initialize(LockManagerDefault.java:374) ~[mongock-driver-core-5.0.36.jar:na]
	at io.mongock.driver.core.lock.LockManagerDefault.acquireLockDefault(LockManagerDefault.java:145) ~[mongock-driver-core-5.0.36.jar:na]
	at io.mongock.runner.core.executor.operation.change.MigrationExecutorBase.executeMigration(MigrationExecutorBase.java:96) ~[mongock-runner-core-5.0.36.jar:na]
	at io.mongock.runner.core.executor.operation.change.MigrationExecutorBase.executeMigration(MigrationExecutorBase.java:46) ~[mongock-runner-core-5.0.36.jar:na]

About

Reproduces a problem in executing tests with Mongock 5


Languages

Language:Java 100.0%