chore(lib): individually disable tests and examples that aren't updated

This commit is contained in:
Sean McArthur
2019-07-12 13:29:57 -07:00
parent f93463b3d9
commit 5da17df97f
29 changed files with 120 additions and 61 deletions

View File

@@ -25,7 +25,7 @@ matrix:
# fi
script:
- cargo build $FEATURES
- cargo build $FEATURES --all-targets
# Disable tests temporarily
# - 'if [ "$BUILD_ONLY" != "1" ]; then cargo test $FEATURES -- --test-threads=1; fi'
# - 'if [ $TRAVIS_RUST_VERSION = nightly ]; then for f in ./benches/*.rs; do cargo test --bench $(basename $f .rs) $FEATURES; done; fi'

View File

@@ -114,66 +114,66 @@ name = "params"
path = "examples/params.rs"
required-features = ["runtime"]
[[example]]
name = "proxy"
path = "examples/proxy.rs"
required-features = ["runtime"]
#[[example]]
#name = "proxy"
#path = "examples/proxy.rs"
#required-features = ["runtime"]
[[example]]
name = "send_file"
path = "examples/send_file.rs"
required-features = ["runtime"]
#[[example]]
#name = "send_file"
#path = "examples/send_file.rs"
#required-features = ["runtime"]
[[example]]
name = "single_threaded"
path = "examples/single_threaded.rs"
required-features = ["runtime"]
#[[example]]
#name = "single_threaded"
#path = "examples/single_threaded.rs"
#required-features = ["runtime"]
[[example]]
name = "state"
path = "examples/state.rs"
required-features = ["runtime"]
#[[example]]
#name = "state"
#path = "examples/state.rs"
#required-features = ["runtime"]
[[example]]
name = "upgrades"
path = "examples/upgrades.rs"
required-features = ["runtime"]
#[[example]]
#name = "upgrades"
#path = "examples/upgrades.rs"
#required-features = ["runtime"]
[[example]]
name = "web_api"
path = "examples/web_api.rs"
required-features = ["runtime"]
#[[example]]
#name = "web_api"
#path = "examples/web_api.rs"
#required-features = ["runtime"]
[[bench]]
name = "end_to_end"
path = "benches/end_to_end.rs"
required-features = ["runtime"]
#[[bench]]
#name = "end_to_end"
#path = "benches/end_to_end.rs"
#required-features = ["runtime"]
[[bench]]
name = "pipeline"
path = "benches/pipeline.rs"
required-features = ["runtime"]
#[[bench]]
#name = "pipeline"
#path = "benches/pipeline.rs"
#required-features = ["runtime"]
[[bench]]
name = "server"
path = "benches/server.rs"
required-features = ["runtime"]
#[[bench]]
#name = "server"
#path = "benches/server.rs"
#required-features = ["runtime"]
[[test]]
name = "client"
path = "tests/client.rs"
required-features = ["runtime"]
#[[test]]
#name = "client"
#path = "tests/client.rs"
#required-features = ["runtime"]
[[test]]
name = "integration"
path = "tests/integration.rs"
required-features = ["runtime"]
#[[test]]
#name = "integration"
#path = "tests/integration.rs"
#required-features = ["runtime"]
[[test]]
name = "server"
path = "tests/server.rs"
required-features = ["runtime"]
#[[test]]
#name = "server"
#path = "tests/server.rs"
#required-features = ["runtime"]

View File

@@ -1,7 +1,5 @@
#![feature(async_await)]
#![deny(warnings)]
extern crate hyper;
//#![deny(warnings)]
use hyper::{Body, Method, Request, Response, Server, StatusCode};
use hyper::service::{make_service_fn, service_fn};

View File

@@ -549,10 +549,20 @@ impl Sink for Sender {
}
*/
#[test]
fn test_body_stream_concat() {
let body = Body::from("hello world");
#[cfg(test)]
mod tests {
// FIXME: re-implement tests with `async/await`, this import should
// trigger a warning to remind us
use crate::Error;
let total = body.concat2().wait().unwrap();
assert_eq!(total.as_ref(), b"hello world");
/*
use super::*;
#[test]
fn test_body_stream_concat() {
let body = Body::from("hello world");
let total = body.concat2().wait().unwrap();
assert_eq!(total.as_ref(), b"hello world");
}
*/
}

View File

@@ -569,6 +569,10 @@ impl ConnectingTcp {
#[cfg(test)]
mod tests {
// FIXME: re-implement tests with `async/await`, this import should
// trigger a warning to remind us
use crate::Error;
/*
use std::io;
use futures::Future;
use super::{Connect, Destination, HttpConnector};
@@ -755,5 +759,6 @@ mod tests {
(reachable, duration)
}
}
*/
}

View File

@@ -250,6 +250,10 @@ impl<T, U> Callback<T, U> {
#[cfg(test)]
mod tests {
// FIXME: re-implement tests with `async/await`, this import should
// trigger a warning to remind us
use crate::Error;
/*
extern crate pretty_env_logger;
#[cfg(feature = "nightly")]
extern crate test;
@@ -367,4 +371,5 @@ mod tests {
rx.taker.cancel();
})
}
*/
}

View File

@@ -774,6 +774,11 @@ impl<T> WeakOpt<T> {
#[cfg(test)]
mod tests {
// FIXME: re-implement tests with `async/await`, this import should
// trigger a warning to remind us
use crate::Error;
/*
use std::sync::Arc;
use std::time::Duration;
use futures::{Async, Future};
@@ -998,4 +1003,5 @@ mod tests {
assert!(!pool.locked().idle.contains_key(&key));
}
*/
}

View File

@@ -1,3 +1,7 @@
// FIXME: re-implement tests with `async/await`, this import should
// trigger a warning to remind us
use super::Client;
/*
#![cfg(feature = "runtime")]
extern crate pretty_env_logger;
@@ -267,3 +271,4 @@ fn bench_http1_get_10b(b: &mut test::Bencher) {
rt.block_on(res1.join(srv1)).expect("res1");
});
}
*/

View File

@@ -121,6 +121,11 @@ where
#[cfg(test)]
mod tests {
// FIXME: re-implement tests with `async/await`, this import should
// trigger a warning to remind us
use crate::Error;
/*
use futures::{future, Async, Future, Poll};
use super::*;
@@ -235,5 +240,6 @@ mod tests {
Ok::<_, ()>(())
}).wait().unwrap();
}
*/
}

View File

@@ -124,6 +124,10 @@ where
#[cfg(test)]
mod tests {
// FIXME: re-implement tests with `async/await`, this import should
// trigger a warning to remind us
use super::Rewind;
/*
use super::*;
extern crate tokio_mockstream;
use self::tokio_mockstream::MockStream;
@@ -212,4 +216,5 @@ mod tests {
stream.read(&mut o2[cnt..]).unwrap();
assert_eq!(&o2, &bs);
}
*/
}

View File

@@ -1,3 +1,7 @@
// FIXME: re-implement tests with `async/await`, this import should
// trigger a warning to remind us
use crate::Error;
/*
#[cfg(feature = "runtime")]
use std::collections::HashMap;
use std::cmp;
@@ -523,3 +527,4 @@ impl Drop for MockedConnections {
}
}
}
*/

View File

@@ -884,7 +884,7 @@ impl State {
#[cfg(test)]
//TODO: rewrite these using dispatch
mod tests {
/*
#[cfg(feature = "nightly")]
#[bench]
fn bench_read_head_short(b: &mut ::test::Bencher) {
@@ -918,6 +918,7 @@ mod tests {
conn.state.reading = Reading::Init;
});
}
*/
/*
use futures::{Async, Future, Stream, Sink};
use futures::future;

View File

@@ -319,6 +319,10 @@ impl StdError for IncompleteBody {
#[cfg(test)]
mod tests {
// FIXME: re-implement tests with `async/await`, this import should
// trigger a warning to remind us
use crate::Error;
/*
use std::io;
use std::io::Write;
use super::Decoder;
@@ -535,5 +539,5 @@ mod tests {
let content = "foobar";
all_async_cases(content, content, Decoder::eof());
}
*/
}

View File

@@ -598,6 +598,10 @@ where
#[cfg(test)]
mod tests {
// FIXME: re-implement tests with `async/await`, this import should
// trigger a warning to remind us
use crate::Error;
/*
extern crate pretty_env_logger;
use super::*;
@@ -656,4 +660,5 @@ mod tests {
Ok::<(), ()>(())
}).wait().unwrap();
}
*/
}

View File

@@ -650,6 +650,10 @@ impl<T: Buf> Buf for BufDeque<T> {
#[cfg(test)]
mod tests {
// FIXME: re-implement tests with `async/await`, this import should
// trigger a warning to remind us
use crate::Error;
/*
use super::*;
use std::io::Read;
use crate::mock::AsyncIo;
@@ -657,8 +661,7 @@ mod tests {
#[cfg(feature = "nightly")]
use test::Bencher;
#[cfg(test)]
impl<T: Read> MemRead for crate::mock::AsyncIo<T> {
impl<T: Read> MemRead for AsyncIo<T> {
fn read_mem(&mut self, len: usize) -> Poll<Bytes, io::Error> {
let mut v = vec![0; len];
let n = try_nb!(self.read(v.as_mut_slice()));
@@ -900,4 +903,5 @@ mod tests {
write_buf.headers.bytes.clear();
})
}
*/
}