In my spring boot application, there is a persistent context class for data source connectivity. While I write junit for this application, it always call this configuration class and fails when database connection is off. The junit didn't run if I exclude this configuration class. What is the solution to run the junit,even the database connectivity fails.
Asked
Active
Viewed 105 times
2
-
Hi. Your solution is good. You must put all database configuration in a separate config class and then don't import it in you junit test class. – zpavel Jul 19 '21 at 20:17
-
I have the same problem. Have you found a solution for it? – Soroush Shemshadi Jun 15 '22 at 11:34