Skip to content

Running tests timeout too fast #37461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
WaDelma opened this issue Oct 28, 2016 · 2 comments
Closed

Running tests timeout too fast #37461

WaDelma opened this issue Oct 28, 2016 · 2 comments

Comments

@WaDelma
Copy link

WaDelma commented Oct 28, 2016

Starting from 1.12 tests started to timeout after a minute has been passed #2873.

This made 6 tests that were succeeding from in my library to timeout and be useless (https://travis-ci.org/WaDelma/poisson/jobs/171430077). (I already had problems with travis timing out which I fixed). It also says that the build was successful even though there were timeouted tests!

I agree with that there should be some kind of timeout, but it's currently too low for me.

So I propose that instead of hardcoding the timeout make it configurable.

@sfackler
Copy link
Member

There is no timeout running tests. That message is printed after a test has been running for a minute, but it keeps going from there:

use std::thread;
use std::time::Duration;

#[test]
fn ok() {
    thread::sleep(Duration::from_secs(70));
}

#[test]
fn panic() {
    thread::sleep(Duration::from_secs(70));
    panic!();
}
     Running target/debug/deps/foo-aea0446ef0e9f61b

running 2 tests
test panic has been running for over 60 seconds
test ok has been running for over 60 seconds
test ok ... ok
test panic ... FAILED

failures:

---- panic stdout ----
        thread 'panic' panicked at 'explicit panic', src/lib.rs:12
note: Run with `RUST_BACKTRACE=1` for a backtrace.


failures:
    panic

test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured

error: test failed

@WaDelma
Copy link
Author

WaDelma commented Oct 29, 2016

Ah I read that wrong then... Nevermind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants