Using a daemon thread guarantees the thread is killed at the end of the test, and stops the failing test from hanging