This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/main by this push:
     new 452dadb311 Fix lint in arrow-flight by updating assert_cmd after it 
upgraded (#8741)
452dadb311 is described below

commit 452dadb311ce512d001dd099621221fa6c9ca117
Author: Vegard Stikbakke <[email protected]>
AuthorDate: Thu Oct 30 11:41:23 2025 +0100

    Fix lint in arrow-flight by updating assert_cmd after it upgraded (#8741)
    
    This is currently causing clippy lint to fail on the arrow-flight crate,
    see e.g.
    https://github.com/apache/arrow-rs/actions/runs/18908499021/job/53972604621
    
    Clippy says
    ```
    error: use of deprecated associated function 
`assert_cmd::Command::cargo_bin`: incompatible with a custom cargo build-dir, 
see instead `cargo::cargo_bin_cmd!`
       --> arrow-flight/tests/flight_sql_client_cli.rs:256:18
        |
    256 |         Command::cargo_bin("flight_sql_client")
    ```
    
    ---------
    
    Co-authored-by: Andrew Lamb <[email protected]>
---
 arrow-flight/tests/flight_sql_client_cli.rs | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/arrow-flight/tests/flight_sql_client_cli.rs 
b/arrow-flight/tests/flight_sql_client_cli.rs
index 812a918d54..c161caae8c 100644
--- a/arrow-flight/tests/flight_sql_client_cli.rs
+++ b/arrow-flight/tests/flight_sql_client_cli.rs
@@ -46,6 +46,11 @@ use tonic::{Request, Response, Status, Streaming};
 
 const QUERY: &str = "SELECT * FROM table;";
 
+/// Return a Command instance for running the `flight_sql_client` CLI
+fn flight_sql_client_cmd() -> Command {
+    Command::new(assert_cmd::cargo::cargo_bin!("flight_sql_client"))
+}
+
 #[tokio::test]
 async fn test_simple() {
     let test_server = FlightSqlServiceImpl::default();
@@ -53,8 +58,7 @@ async fn test_simple() {
     let addr = fixture.addr;
 
     let stdout = tokio::task::spawn_blocking(move || {
-        Command::cargo_bin("flight_sql_client")
-            .unwrap()
+        flight_sql_client_cmd()
             .env_clear()
             .env("RUST_BACKTRACE", "1")
             .env("RUST_LOG", "warn")
@@ -94,8 +98,7 @@ async fn test_get_catalogs() {
     let addr = fixture.addr;
 
     let stdout = tokio::task::spawn_blocking(move || {
-        Command::cargo_bin("flight_sql_client")
-            .unwrap()
+        flight_sql_client_cmd()
             .env_clear()
             .env("RUST_BACKTRACE", "1")
             .env("RUST_LOG", "warn")
@@ -133,8 +136,7 @@ async fn test_get_db_schemas() {
     let addr = fixture.addr;
 
     let stdout = tokio::task::spawn_blocking(move || {
-        Command::cargo_bin("flight_sql_client")
-            .unwrap()
+        flight_sql_client_cmd()
             .env_clear()
             .env("RUST_BACKTRACE", "1")
             .env("RUST_LOG", "warn")
@@ -173,8 +175,7 @@ async fn test_get_tables() {
     let addr = fixture.addr;
 
     let stdout = tokio::task::spawn_blocking(move || {
-        Command::cargo_bin("flight_sql_client")
-            .unwrap()
+        flight_sql_client_cmd()
             .env_clear()
             .env("RUST_BACKTRACE", "1")
             .env("RUST_LOG", "warn")
@@ -212,8 +213,7 @@ async fn test_get_tables_db_filter() {
     let addr = fixture.addr;
 
     let stdout = tokio::task::spawn_blocking(move || {
-        Command::cargo_bin("flight_sql_client")
-            .unwrap()
+        flight_sql_client_cmd()
             .env_clear()
             .env("RUST_BACKTRACE", "1")
             .env("RUST_LOG", "warn")
@@ -253,8 +253,7 @@ async fn test_get_tables_types() {
     let addr = fixture.addr;
 
     let stdout = tokio::task::spawn_blocking(move || {
-        Command::cargo_bin("flight_sql_client")
-            .unwrap()
+        flight_sql_client_cmd()
             .env_clear()
             .env("RUST_BACKTRACE", "1")
             .env("RUST_LOG", "warn")
@@ -295,8 +294,7 @@ async fn test_do_put_prepared_statement(test_server: 
FlightSqlServiceImpl) {
     let addr = fixture.addr;
 
     let stdout = tokio::task::spawn_blocking(move || {
-        Command::cargo_bin("flight_sql_client")
-            .unwrap()
+        flight_sql_client_cmd()
             .env_clear()
             .env("RUST_BACKTRACE", "1")
             .env("RUST_LOG", "warn")

Reply via email to