Editorial question20.8K views1,746 votes0 answers3,183 following
AI-generatedtest timed out after <N> milliseconds – JUnit 5 @Timeout does not interrupt test thread
The goal is to guarantee that a test method that exceeds its @Timeout limit has its executing thread interrupted, preventing any lingering side‑effects such as resource leaks or inconsistent state. Currently, JUnit 5’s TimeoutExtension records a failure but does not call Thread.interrupt() on the test thread, leaving the thread to continue running after the