Ktor - gradle test task faild

108 views Asked by At

I have a strange problem. When I run my test in IDEA they work, but if I do it from console 'gradle test' I get:

com.easythings.teessstttt.service.ProductServiceTest > initializationError FAILED
    org.jetbrains.exposed.exceptions.ExposedSQLException at ProductServiceTest.kt:29
        Caused by: org.h2.jdbc.JdbcBatchUpdateException at ProductServiceTest.kt:29

Why?

1

There are 1 answers

0
LookBad On

I fixed it. When I started tests in IDEA I did it for a signle file and I have only one connection to the database. Using the 'gradle test' command starts all tests at the same time. I added "time now" to database name and it solved the problem.