runtime: test creating a single-threaded runtime. (#1717)

This commit is contained in:
Carl Lerche 2019-10-31 22:28:31 -07:00 committed by GitHub
parent 02f7264008
commit 64c26ab1ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,12 @@ use std::time::Duration;
thread_local!(static FOO: Cell<u32> = Cell::new(0));
#[test]
fn single_thread() {
// No panic when starting a runtime w/ a single thread
let _ = Builder::new().num_threads(1).build();
}
#[test]
fn shutdown_drops_futures() {
for _ in 0..1_000 {