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

Function invoke_async_error_before_executing_async

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

Source from the content-addressed store, hash-verified

267
268 #[tokio::test(flavor = "multi_thread", worker_threads = 1)]
269 async fn invoke_async_error_before_executing_async() -> errors::Result<()> {
270 let s_test = "j4rs_rust";
271 let jvm = create_tests_jvm()?;
272 let my_test = jvm.create_instance("org.astonbitecode.j4rs.tests.MyTest", InvocationArg::empty())?;
273 let instance_result = jvm
274 .invoke_async(&my_test, "echo", &[InvocationArg::try_from(s_test)?])
275 .await;
276 assert!(instance_result.is_err());
277 Ok(())
278 }
279
280 #[tokio::test(flavor = "multi_thread", worker_threads = 2)]
281 async fn invoke_void_future() -> 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