Open GoogleCodeExporter opened 8 years ago
I've been looking a little into this.
When using just the spring testing framework you are able to use the
DirtiesContextTestExecutionListener to signal when to refresh the context.
When using mycila you very often specify behavior for each test, and this a
fresh mock should be injected for each testexecution (as well as closing the
context properly after each testexecution).
I therefore propose to close the context after each testexecution, and refresh
it before the next testexecution.
This should fix the issue, but might be slower due to more initialization.
Does this sound OK?
Note:
In the future we might support the same DirtiesContextTestExecutionListener as
in the spring testframework for the enduser to control this better - but not at
this stage.
Original comment by davidkar...@gmail.com
on 11 Jan 2012 at 4:21
Original comment by davidkar...@gmail.com
on 11 Jan 2012 at 4:23
Original comment by davidkar...@gmail.com
on 11 Jan 2012 at 4:24
Sorry to get back after quite some time. This solution seems okay. How can I
close and refresh the context?
Original comment by band...@inf.elte.hu
on 4 Apr 2012 at 4:39
Original issue reported on code.google.com by
band...@inf.elte.hu
on 8 Nov 2011 at 12:17