Replace futures::executor::block_on with tokio::block_in_place

This commit is contained in:
revue_2_presse
2025-02-25 20:19:14 +01:00
parent 4fc4152eac
commit 5d468d3e19
4 changed files with 110 additions and 51 deletions

View File

@@ -1,4 +1,6 @@
use crate::helper::load_module_test;
#[cfg(not(target_arch = "wasm32"))]
use crate::helper::load_module_test_with_tokio_runtime;
use serial_test::serial;
// issue #831
@@ -43,3 +45,14 @@ fn load_context_unreachable() {
fn issue2725_dcg_without_module() {
load_module_test("tests-pl/issue2725.pl", "");
}
#[test]
#[cfg(feature = "http")]
#[cfg(not(target_arch = "wasm32"))]
#[cfg_attr(miri, ignore = "it takes too long to run")]
fn http_open_hanging() {
load_module_test_with_tokio_runtime(
"tests-pl/issue-http_open-hanging.pl",
"received response with status code:200\nreceived response with status code:200\nreceived response with status code:200\nreceived response with status code:200\nreceived response with status code:200\n"
);
}