开发者

What happens if I terminate jUnit tests

开发者 https://www.devze.com 2023-01-13 04:18 出处:网络
I have a weird question. If I get somehow stuck in my tests, I have to terminate them. But still I need to destroy a background process. Meaning I need some method that is called on the jUnit terminat

I have a weird question. If I get somehow stuck in my tests, I have to terminate them. But still I need to destroy a background process. Meaning I need some method that is called on the jUnit termination to override. Afterclass method or Finalize aren't it. Is there somethin开发者_StackOverflow中文版g?


No, when you terminate a JVM there's not much you can do to react. Depending on how you stop it, shutdown hooks may or may not run, but that's pretty much your only chance.

0

精彩评论

暂无评论...
验证码 换一张
取 消