thexiay commented on code in PR #428:
URL: https://github.com/apache/iceberg-rust/pull/428#discussion_r1666223166


##########
Cargo.toml:
##########
@@ -82,6 +82,7 @@ serde_repr = "0.1.16"
 serde_with = "3.4.0"
 tempfile = "3.8"
 tokio = { version = "1", features = ["macros"] }
+tokio-shared-rt = "0.1.0"

Review Comment:
   ok, i will use our tools to share tokio runtime between test case. But a 
share tokio runtime is indeed needed.
   Because static shared resources maybe contains some resource rely on tokio 
runtime, e.g. tokio Mutex .So if one of those test case exit, tokio runtime is 
droped, the static shared resources throw `A Tokio 1.x context was found, but 
it is being shutdown.`
   
   So here I want to rewrite our own macro, or do something like this? 
   ```
   pub fn test<F: std::future::Future>(f: F) -> F::Output {
       rt().handle().enter(|| futures::executor::block_on(f))
   }
   
   #[test]
   fn a_test() {
       test(async {
           println!(" this is async");
       });
   }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to