MCPcopy Create free account
hub / github.com/astonbitecode/j4rs / invoke_void_future

Function invoke_void_future

rust/src/async_api/mod.rs:281–294  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

279
280 #[tokio::test(flavor = "multi_thread", worker_threads = 2)]
281 async fn invoke_void_future() -> errors::Result<()> {
282 let s_test = "j4rs_rust";
283 let jvm = create_tests_jvm()?;
284 let my_test = jvm.create_instance("org.astonbitecode.j4rs.tests.MyTest", InvocationArg::empty())?;
285 let instance_res = jvm
286 .invoke_async(
287 &my_test,
288 "executeVoidFuture",
289 &[InvocationArg::try_from(s_test)?],
290 )
291 .await;
292 assert!(instance_res.is_ok());
293 Ok(())
294 }
295
296 #[tokio::test(flavor = "multi_thread", worker_threads = 2)]
297 async fn invoke_into_sendable_async_success() -> errors::Result<()> {

Callers

nothing calls this directly

Calls 3

create_tests_jvmFunction · 0.85
create_instanceMethod · 0.80
invoke_asyncMethod · 0.80

Tested by

no test coverage detected