diff --git a/src/tests/ckb_rpc.rs b/src/tests/ckb_rpc.rs index 4869da3..293838d 100644 --- a/src/tests/ckb_rpc.rs +++ b/src/tests/ckb_rpc.rs @@ -194,6 +194,20 @@ fn test_cargo_hang_5() { println!("999"); } +#[test] +fn test_cargo_hang_6() { + use std::cell::LazyCell; + thread_local! { + pub static RUNTIME: LazyCell = + LazyCell::new(|| tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap()); + } + let a = async { "1" }; + let block = RUNTIME.with(|rt| rt.block_on(a)); + // let block = block.unwrap(); + // assert!(block.is_none()); + println!("999"); +} + #[test] fn test_get_packed_block_with_cycles_fail() { let ckb_client = CkbRpcClient::new(TEST_CKB_RPC_URL);