After upgrading TestNG from 7.1.0 to 7.3.0, tests fail with:

java.lang.IllegalStateException: org.springframework.web.context.support.GenericWebApplicationContext@5567c481 has been closed already

I have tests that create multiple application contexts.

Is TestNG 7.3.0 supported?

Comment From: philwebb

TestNG support is provided via the Spring Framework Test classes. We don't have that many people that use it. Please could you provide a sample application that shows the problem. I'll transfer this issue for the Framework team to look at.

Comment From: sbrannen

Is testng 7.3.0 supported?

We already test spring-test against TestNG 7.3.0 in master, and all of our tests pass.

As Phil mentioned, please provide a sample application that demonstrates the issue you are encountering.

Comment From: cdalexndr

After debugging it seems the issue was caused by https://github.com/spring-projects/spring-framework/issues/11019 (and the multitude issues that it causes). Seems that upgrading to 7.3.0 reordered tests so that this issue surfaced (running a @DirtiesContext test first, then the next test saw closed context).