From 4fc9479e64ab35cb8f4c08c8a0f78de948cac882 Mon Sep 17 00:00:00 2001 From: driftluo Date: Tue, 24 Dec 2024 15:27:00 +0800 Subject: [PATCH] revert --- src/tests/ckb_rpc.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/tests/ckb_rpc.rs b/src/tests/ckb_rpc.rs index 02c8fec..111c0ab 100644 --- a/src/tests/ckb_rpc.rs +++ b/src/tests/ckb_rpc.rs @@ -230,6 +230,31 @@ fn test_cargo_hang_7() { println!("999"); } +#[test] +fn test_cargo_hang_8() { + use std::cell::LazyCell; + + pub static RUNTIME: LazyCell = LazyCell::new(|| { + tokio::runtime::Builder::new_current_thread() + .enable_all() + .build() + .unwrap() + }); + + let a = async { + reqwest::get("https://httpbin.org/ip") + .await + .unwrap() + .json::>() + .await + }; + let block = RUNTIME.block_on(a); + // let block = block.unwrap(); + // assert!(block.is_none()); + println!("{:?}", block); + println!("999"); +} + #[test] fn test_get_packed_block_with_cycles_fail() { let ckb_client = CkbRpcClient::new(TEST_CKB_RPC_URL);