allure-java icon indicating copy to clipboard operation
allure-java copied to clipboard

Allure processes leak when using allure:serve

Open karltiirik opened this issue 3 years ago • 2 comments

Describe the bug Allure process not killed after Ctrl + C (leaks processes).

To Reproduce Steps to reproduce the behavior:

  1. Use sample project: https://github.com/karltiirik/spock-restassured-allure/commit/88de0e308449f04ab81b0f650e52d8bfcafe7cde
  2. Run tests: mvnw clean test
  3. Generate and serve Allure report: mvnw allure:serve
  4. Press <Ctrl+C> to exit

Expected behavior The java process that serves the Allure report is killed. The same behavior that is when having Allure on your path and doing allure serve and after <Ctrl+C> to exit (then the process is killed).

Desktop (please complete the following information):

  • OS: Microsoft Windows 10 Enterprise 10.0.19044 Build 19044

karltiirik avatar Oct 26 '22 08:10 karltiirik

For allure-commandline we use default Gradle application plugin. Windows doesn't terminate child processes when the parent process dies. And there is no easy solution for that.

baev avatar Oct 26 '22 13:10 baev

Hmm, that's sad. Do know of any workaround for this problem? Like a plugin that keeps track of all the spawned child process and can kill them when the maven build finishes or something along the lines?

karltiirik avatar Nov 09 '22 19:11 karltiirik