Configure test database consists of Exposed configuration and connection. Configure application is for other modules.
Edit: Seems like this is caused by Exposed implicitly initializing in different thread
✅ 1
a
Aleksei Tirman [JB]
10/02/2024, 7:56 AM
Can you share simplified definitions of the
configureTestDatabase
and
configureApplication
methods to reproduce the problem?
m
Mario Andhika
10/02/2024, 8:28 AM
I found the problem. What’s relevant is that inside
configureTestDatabase
, which is inside the application block, I call Exposed’s
Database.connect()
. By moving it outside of the application block, the code runs sequentially.