You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I originally started using ntest::timeout it was because I had tests that would infinitely loop and never complete. Back on version 0.3.4 this worked well, and I happened to never have updated in that project. When trying to use it again in a new project when diagnosing a stuck test I noticed newer versions would no longer deal with this.
To Reproduce
Create a crate containing
#[test]#[ntest::timeout(1000)]fnfoo(){loop{}}
run cargo test
Expected behavior
The test to fail after 1 second
The text was updated successfully, but these errors were encountered:
I had a problem with the timebomb dependency. I "fixed" the issue by making it a simple max_time() function instead of a real timeout which requires another thread. I will have a look into it again and see if I can find a more satisfying solution. I keep you updated
I had some issues using normal functions from within a procedural macro. With version 7.1 I found a solution that works. This should have solved your issue with ntest.
Describe the bug
When I originally started using
ntest::timeout
it was because I had tests that would infinitely loop and never complete. Back on version0.3.4
this worked well, and I happened to never have updated in that project. When trying to use it again in a new project when diagnosing a stuck test I noticed newer versions would no longer deal with this.To Reproduce
Create a crate containing
run
cargo test
Expected behavior
The test to fail after 1 second
The text was updated successfully, but these errors were encountered: