allure-framework / allure-java

Allure integrations for Java test frameworks
Apache License 2.0
342 stars 219 forks source link

Allure processes leak when using allure:serve #836

Open karltiirik opened 1 year ago

karltiirik commented 1 year ago

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):

baev commented 1 year ago

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.

karltiirik commented 1 year ago

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?