summaryrefslogtreecommitdiffstats
path: root/tokio/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tokio/tests')
-rw-r--r--tokio/tests/process_issue_42.rs2
-rw-r--r--tokio/tests/rt_basic.rs (renamed from tokio/tests/rt_current_thread.rs)2
-rw-r--r--tokio/tests/rt_common.rs4
-rw-r--r--tokio/tests/rt_threaded.rs (renamed from tokio/tests/rt_thread_pool.rs)9
-rw-r--r--tokio/tests/signal_drop_rt.rs2
-rw-r--r--tokio/tests/signal_multi_rt.rs2
-rw-r--r--tokio/tests/time_rt.rs4
7 files changed, 14 insertions, 11 deletions
diff --git a/tokio/tests/process_issue_42.rs b/tokio/tests/process_issue_42.rs
index 21651ac8..5571c199 100644
--- a/tokio/tests/process_issue_42.rs
+++ b/tokio/tests/process_issue_42.rs
@@ -18,7 +18,7 @@ fn run_test() {
let finished_clone = finished.clone();
thread::spawn(move || {
- let mut rt = runtime::Builder::new().current_thread().build().unwrap();
+ let mut rt = runtime::Builder::new().basic_scheduler().build().unwrap();
let mut futures = FuturesOrdered::new();
rt.block_on(async {
diff --git a/tokio/tests/rt_current_thread.rs b/tokio/tests/rt_basic.rs
index b233deee..039bb22f 100644
--- a/tokio/tests/rt_current_thread.rs
+++ b/tokio/tests/rt_basic.rs
@@ -28,7 +28,7 @@ fn spawned_task_does_not_progress_without_block_on() {
fn rt() -> Runtime {
tokio::runtime::Builder::new()
- .current_thread()
+ .basic_scheduler()
.build()
.unwrap()
}
diff --git a/tokio/tests/rt_common.rs b/tokio/tests/rt_common.rs
index 2637793a..6e8e58fb 100644
--- a/tokio/tests/rt_common.rs
+++ b/tokio/tests/rt_common.rs
@@ -4,12 +4,12 @@
macro_rules! rt_test {
($($t:tt)*) => {
- mod current_thread {
+ mod basic_scheduler {
$($t)*
fn rt() -> Runtime {
tokio::runtime::Builder::new()
- .current_thread()
+ .basic_scheduler()
.build()
.unwrap()
}
diff --git a/tokio/tests/rt_thread_pool.rs b/tokio/tests/rt_threaded.rs
index d290d75a..7daf331b 100644
--- a/tokio/tests/rt_thread_pool.rs
+++ b/tokio/tests/rt_threaded.rs
@@ -16,7 +16,10 @@ use std::task::{Context, Poll};
#[test]
fn single_thread() {
// No panic when starting a runtime w/ a single thread
- let _ = runtime::Builder::new().thread_pool().num_threads(1).build();
+ let _ = runtime::Builder::new()
+ .threaded_scheduler()
+ .num_threads(1)
+ .build();
}
#[test]
@@ -185,7 +188,7 @@ fn drop_threadpool_drops_futures() {
let b = num_dec.clone();
let rt = runtime::Builder::new()
- .thread_pool()
+ .threaded_scheduler()
.after_start(move || {
a.fetch_add(1, Relaxed);
})
@@ -224,7 +227,7 @@ fn after_start_and_before_stop_is_called() {
let after_inner = after_start.clone();
let before_inner = before_stop.clone();
let mut rt = tokio::runtime::Builder::new()
- .thread_pool()
+ .threaded_scheduler()
.after_start(move || {
after_inner.clone().fetch_add(1, Ordering::Relaxed);
})
diff --git a/tokio/tests/signal_drop_rt.rs b/tokio/tests/signal_drop_rt.rs
index 7387e312..0cb7d482 100644
--- a/tokio/tests/signal_drop_rt.rs
+++ b/tokio/tests/signal_drop_rt.rs
@@ -37,7 +37,7 @@ fn dropping_loops_does_not_cause_starvation() {
fn rt() -> Runtime {
tokio::runtime::Builder::new()
- .current_thread()
+ .basic_scheduler()
.build()
.unwrap()
}
diff --git a/tokio/tests/signal_multi_rt.rs b/tokio/tests/signal_multi_rt.rs
index fb5449f0..8020c593 100644
--- a/tokio/tests/signal_multi_rt.rs
+++ b/tokio/tests/signal_multi_rt.rs
@@ -47,7 +47,7 @@ fn multi_loop() {
fn rt() -> Runtime {
tokio::runtime::Builder::new()
- .current_thread()
+ .basic_scheduler()
.build()
.unwrap()
}
diff --git a/tokio/tests/time_rt.rs b/tokio/tests/time_rt.rs
index 2576db4a..235d1960 100644
--- a/tokio/tests/time_rt.rs
+++ b/tokio/tests/time_rt.rs
@@ -24,10 +24,10 @@ fn timer_with_threaded_runtime() {
}
#[test]
-fn timer_with_current_thread_runtime() {
+fn timer_with_basic_scheduler() {
use tokio::runtime::Builder;
- let mut rt = Builder::new().current_thread().build().unwrap();
+ let mut rt = Builder::new().basic_scheduler().build().unwrap();
let (tx, rx) = mpsc::channel();
rt.block_on(async move {