Skip to content

Commit 9847d74

Browse files
committed
test
Signed-off-by: TXXT <[email protected]>
1 parent 6661aaf commit 9847d74

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,9 +723,9 @@ pub fn list() -> Vec<(String, String)> {
723723
#[doc(hidden)]
724724
pub fn eval<R, F: FnOnce(Option<String>) -> R>(name: &str, f: F) -> Option<R> {
725725
let id = thread::current().id();
726-
let group = REGISTRY_GROUP.read().unwrap();
727726

728727
let p = {
728+
let group = REGISTRY_GROUP.read().unwrap();
729729
let registry = group
730730
.get(&id)
731731
.unwrap_or(&REGISTRY_GLOBAL.registry)

tests/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ fn test_pause() {
3636
});
3737

3838
rx_before.recv().unwrap();
39-
assert!(rx.recv_timeout(Duration::from_millis(10000)).is_err());
39+
assert!(rx.recv_timeout(Duration::from_millis(10)).is_err());
4040
println!("..................");
4141
fail::cfg("pause", "pause").unwrap();
4242
rx.recv_timeout(Duration::from_millis(300)).unwrap();
4343

4444
rx_before.recv().unwrap();
45-
assert!(rx.recv_timeout(Duration::from_millis(10000)).is_err());
45+
assert!(rx.recv_timeout(Duration::from_millis(10)).is_err());
4646
fail::remove("pause");
4747

4848
rx.recv_timeout(Duration::from_millis(300)).unwrap();

0 commit comments

Comments
 (0)