Skip to content

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

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

Merged
merged 1 commit into from
Jul 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
124 changes: 62 additions & 62 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "send_file"
path = "examples/send_file.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 = "upgrades"
path = "examples/upgrades.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 = "pipeline"
path = "benches/pipeline.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 = "integration"
path = "tests/integration.rs"
required-features = ["runtime"]

[[test]]
name = "server"
path = "tests/server.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 = "single_threaded"
#path = "examples/single_threaded.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 = "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 = "pipeline"
#path = "benches/pipeline.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 = "integration"
#path = "tests/integration.rs"
#required-features = ["runtime"]

#[[test]]
#name = "server"
#path = "tests/server.rs"
#required-features = ["runtime"]

File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 1 addition & 3 deletions examples/echo.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 16 additions & 6 deletions src/body/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,20 @@ impl Sink for Sender {
}
*/

#[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");
#[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::*;
#[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");
}
*/
}
5 changes: 5 additions & 0 deletions src/client/connect/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -755,5 +759,6 @@ mod tests {
(reachable, duration)
}
}
*/
}

5 changes: 5 additions & 0 deletions src/client/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -367,4 +371,5 @@ mod tests {
rx.taker.cancel();
})
}
*/
}
6 changes: 6 additions & 0 deletions src/client/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -998,4 +1003,5 @@ mod tests {

assert!(!pool.locked().idle.contains_key(&key));
}
*/
}
5 changes: 5 additions & 0 deletions src/client/tests.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -267,3 +271,4 @@ fn bench_http1_get_10b(b: &mut test::Bencher) {
rt.block_on(res1.join(srv1)).expect("res1");
});
}
*/
6 changes: 6 additions & 0 deletions src/common/drain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;

Expand Down Expand Up @@ -235,5 +240,6 @@ mod tests {
Ok::<_, ()>(())
}).wait().unwrap();
}
*/
}

5 changes: 5 additions & 0 deletions src/common/io/rewind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -212,4 +216,5 @@ mod tests {
stream.read(&mut o2[cnt..]).unwrap();
assert_eq!(&o2, &bs);
}
*/
}
5 changes: 5 additions & 0 deletions src/mock.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -523,3 +527,4 @@ impl Drop for MockedConnections {
}
}
}
*/
3 changes: 2 additions & 1 deletion src/proto/h1/conn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -918,6 +918,7 @@ mod tests {
conn.state.reading = Reading::Init;
});
}
*/
/*
use futures::{Async, Future, Stream, Sink};
use futures::future;
Expand Down
6 changes: 5 additions & 1 deletion src/proto/h1/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -535,5 +539,5 @@ mod tests {
let content = "foobar";
all_async_cases(content, content, Decoder::eof());
}

*/
}
5 changes: 5 additions & 0 deletions src/proto/h1/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down Expand Up @@ -656,4 +660,5 @@ mod tests {
Ok::<(), ()>(())
}).wait().unwrap();
}
*/
}
8 changes: 6 additions & 2 deletions src/proto/h1/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -650,15 +650,18 @@ 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;

#[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()));
Expand Down Expand Up @@ -900,4 +903,5 @@ mod tests {
write_buf.headers.bytes.clear();
})
}
*/
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.