Restart Spring (boot) Context when testing

I have a spring boot project that is hooked into a ci/cd pipeline uses maven to run integration tests. Part of these tests is booting a (mysql) test container. I have this working, and have had this working for a while (all tests passing). Recently, however, my tests began failing when ran with maven as a group (with weird errors), but they run fine when ran individually. Hence, I would like to reboot the spring context, which should reboot my test container. Is there an easy way to do this? I’ve tried dirties context, but it doesn’t seem to work.

Source: StackOverflow