amol- commented on code in PR #12822:
URL: https://github.com/apache/arrow/pull/12822#discussion_r845118637


##########
ci/scripts/r_test.sh:
##########
@@ -90,11 +90,23 @@ SCRIPT="as_cran <- 
!identical(tolower(Sys.getenv('NOT_CRAN')), 'true')
       message('Running minio for S3 tests (if build supports them)')
       minio_dir <- tempfile()
       dir.create(minio_dir)
-      pid <- sys::exec_background('minio', c('server', minio_dir))
-      on.exit(tools::pskill(pid))
+      pid_minio <- sys::exec_background('minio', c('server', minio_dir))
+      on.exit(tools::pskill(pid_minio), add = TRUE)
     }
   }
 
+  if(reticulate::py_module_available('pyarrow')){
+    message('Running flight demo server for tests.')
+    pid_flight <- sys::exec_background(
+      'R', 
+      c(
+        '-e',
+        'reticulate::import_from_path(\"demo_flight_server\", 
\"./inst\")\$DemoFlightServer(port = 8089)\$serve()'

Review Comment:
   Is there a reason why we are going through `reticulate` instead of just 
invoking python to start the server?
   
   As far as I understand, starting
   `python -c 
"__import__('demo_flight_server').DemoFlightServer(port=8089).serve()"` as the 
subprocess should do the same thing without involving and additional R 
interpreter with reticulate



-- 
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]

Reply via email to