Skip to content

Fixing data pollution between tests #4845

Answered by Youans
Youans asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry for late reply, Thanks for your great notes
For the stack I use Spring Boot Test & JUnit Jupiter 5 and Liquibase for database migration

I managed to make my approach work but it was not an easy road

But just to summarize the problem,

I was trying to restore dump completely [structure + data] doing so requires to drop current opened database but this was not an option since I faced tons of
org.postgresql.util.PSQLException: FATAL: terminating connection due to administrator command
and can not drop current opened database errors so this was a no go option

Luckily,
There is an option to backup data only in postgres but when I tried to restore I faced the 1st problem the database locks…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@kiview
Comment options

Answer selected by Youans
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
4 participants
Converted from issue

This discussion was converted from issue #4804 on January 03, 2022 17:59.