Closed robindecath closed 4 days ago
Hi, thanks for rising this issue, I can see there is some quick adjustment to handle properly multiple schema in a datasource. I'm going to do the adjustments soon.
v1.6.0 should resolve your issue. You can specify a list of schema to clean in your initializer :
SpringJPASteps.schemasToClean = List.of("public", "library", "store");
Hello, thanks for the fix. I will try that and keep you updated.
https://github.com/Decathlon/tzatziki/blob/c392abc4081b9a88c32e94d940dcde7d093b7cd8/tzatziki-spring-jpa/src/main/java/com/decathlon/tzatziki/utils/DatabaseCleaner.java#L86
Hello,
My db is composed of several schemas. During tests, it happened that when running a single test alone, it worked, but running all tests, some failed that haven't failed when running separately.
I have seen that my table were not truncated. I tried to used your
DatabaseClean.clean(dataSource, "schemaname")
but it would not work, telling me for examplerelation "XXX" does not exist
. Indeed running the sql lineTRUNCATE XXX RESTART IDENTITY CASCADE
would not work, but specifying the schemaTRUNCATE SCHEMANAME.XXX RESTART IDENTITY CASCADE
would make it work.I copied your
DatabaseClean
class locally and updated this line to add the schema name, and it worked finally for me:Can you see for it and update if needed ?
Kind regards