I am testing an async function that might get deadlocked. I tried to add a fixture to limit the function to only run for 5 seconds before raising a failure, but it hasn’t worked so far. Setup: Code: — Edit: Mikhail’s solution works fine. I can’t find a way to incorporate it into a fixture, though. Answer Convenient way to