Omega359 commented on code in PR #13936:
URL: https://github.com/apache/datafusion/pull/13936#discussion_r1900134835
##########
datafusion/sqllogictest/bin/sqllogictests.rs:
##########
@@ -97,23 +169,89 @@ async fn run_tests() -> Result<()> {
}
options.warn_on_ignored();
+ #[cfg(feature = "postgres")]
+ let start_pg_database = options.postgres_runner && !is_pg_uri_set();
+ #[cfg(feature = "postgres")]
+ if start_pg_database {
+ info!("Starting postgres db ...");
+
+ thread::spawn(|| {
+ execute_blocking(start_postgres(
+ &POSTGRES_IN,
+ &POSTGRES_HOST,
+ &POSTGRES_PORT,
+ &POSTGRES_STOPPED,
+ ))
+ });
+
+ POSTGRES_IN.tx.send(FetchHost).unwrap();
+ let db_host = POSTGRES_HOST.rx.lock().await.recv().await.unwrap();
Review Comment:
Sure, but you need access to the host/post and container elsewhere. You
could return that info back of course but this code was inspired by my test
code in another project where that wasn't feasible.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]