Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
driftluo committed Dec 24, 2024
1 parent affcd9c commit 4fc9479
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/tests/ckb_rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<tokio::runtime::Runtime> = LazyCell::new(|| {
tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()
.unwrap()
});

let a = async {
reqwest::get("https://httpbin.org/ip")
.await
.unwrap()
.json::<std::collections::HashMap<String, String>>()
.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);
Expand Down

0 comments on commit 4fc9479

Please sign in to comment.