mirror of
https://github.com/fafhrd91/actix-net
synced 2025-06-27 00:27:43 +02:00
add System::try_current (#275)
This commit is contained in:
@ -288,3 +288,13 @@ fn new_arbiter_with_tokio() {
|
||||
|
||||
assert_eq!(false, counter.load(Ordering::SeqCst));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn try_current_no_system() {
|
||||
assert!(System::try_current().is_none())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn try_current_with_system() {
|
||||
System::new().block_on(async { assert!(System::try_current().is_some()) });
|
||||
}
|
||||
|
Reference in New Issue
Block a user