https://kotlinlang.org logo
#minutest
Title
# minutest
d

dmcg

02/21/2020, 7:10 PM
What I don’t know is what the lifetime of the TestContextManager should be. This works though.
r

robfletcher

02/22/2020, 2:23 PM
@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)
Not sure that’s directly relevant to what you’re asking but it seems to be
That annotation can apply to individual tests as well. I’ve never used it that way, and honestly, having to use it at all IMO indicates things are kind of a mess
d

dmcg

02/22/2020, 4:18 PM
Thanks @robfletcher - I’ll look at how many application contexts are created. It currently only starts the servlet container once, but I don’t know if that means the same thing.
r

robfletcher

02/22/2020, 5:15 PM
It should do, and that’s typically the desired behavior
2 Views