Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: TXXT <hunterlxt@live.com>
  • Loading branch information
hunterlxt committed May 26, 2020
1 parent 6661aaf commit 9847d74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -723,9 +723,9 @@ pub fn list() -> Vec<(String, String)> {
#[doc(hidden)]
pub fn eval<R, F: FnOnce(Option<String>) -> R>(name: &str, f: F) -> Option<R> {
let id = thread::current().id();
let group = REGISTRY_GROUP.read().unwrap();

let p = {
let group = REGISTRY_GROUP.read().unwrap();
let registry = group
.get(&id)
.unwrap_or(&REGISTRY_GLOBAL.registry)
Expand Down
4 changes: 2 additions & 2 deletions tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ fn test_pause() {
});

rx_before.recv().unwrap();
assert!(rx.recv_timeout(Duration::from_millis(10000)).is_err());
assert!(rx.recv_timeout(Duration::from_millis(10)).is_err());
println!("..................");
fail::cfg("pause", "pause").unwrap();
rx.recv_timeout(Duration::from_millis(300)).unwrap();

rx_before.recv().unwrap();
assert!(rx.recv_timeout(Duration::from_millis(10000)).is_err());
assert!(rx.recv_timeout(Duration::from_millis(10)).is_err());
fail::remove("pause");

rx.recv_timeout(Duration::from_millis(300)).unwrap();
Expand Down

0 comments on commit 9847d74

Please sign in to comment.