warning: has been running for over 60 seconds
Closed this issue · 1 comments
szabgab commented
When running tarpaulin with --timeout 120
I still get a warning test ... has been running for over 60 seconds
e.g. this code
pub fn add(left: u64, right: u64) -> u64 {
std::thread::sleep(core::time::Duration::from_secs(61));
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
This command:
$ time cargo tarpaulin --timeout 65
Sep 01 10:14:46.494 INFO cargo_tarpaulin::config: Creating config
Sep 01 10:14:46.504 INFO cargo_tarpaulin: Running Tarpaulin
Sep 01 10:14:46.504 INFO cargo_tarpaulin: Building project
Sep 01 10:14:46.504 INFO cargo_tarpaulin::cargo: Cleaning project
Compiling slow-test v0.1.0 (/home/gabor/work/slow-test)
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.17s
Sep 01 10:14:46.751 INFO cargo_tarpaulin::process_handling::linux: Launching test
Sep 01 10:14:46.751 INFO cargo_tarpaulin::process_handling: running /home/gabor/work/slow-test/target/debug/deps/slow_test-6e7707deca3c1484
running 1 test
test tests::it_works has been running for over 60 seconds
test tests::it_works ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 61.20s
I think this warning confusing.
xd009642 commented
This warning is printed via the rustc test runner itself so outside of tarpaulin's code and instead exists somewhere within https://github.com/rust-lang/rust