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

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


The following commit(s) were added to refs/heads/main by this push:
     new ca5564e007a GH-50828: [C++][FlightRPC][ODBC] Add SQLGetInfo remote 
tests (#50838)
ca5564e007a is described below

commit ca5564e007a209e251b9d4648af4bc6a53c68c4f
Author: Eric Wang <[email protected]>
AuthorDate: Wed Oct 14 22:09:00 2026 -0400

    GH-50828: [C++][FlightRPC][ODBC] Add SQLGetInfo remote tests (#50838)
    
    ### Rationale for this change
    
    The SQLGetInfo tests for `SQL_CREATE_SCHEMA` and `SQL_CREATE_TABLE` only 
covered the mock server. The remote fixture can report different DDL 
capabilities, so the missing remote coverage allowed regressions to go 
unnoticed.
    
    ### What changes are included in this PR?
    
    - Add a named remote connection-info fixture.
    - Add remote tests for `SQL_CREATE_SCHEMA` and `SQL_CREATE_TABLE`.
    - Keep the mock expectations (`1`) and assert the remote fixture's 
unsupported DDL values (`0`) separately.
    
    Fixes #50828.
    
    ### Are these changes tested?
    
    Yes
    
    ### Are there any user-facing changes?
    
    No.
    
    * GitHub Issue: #50828
    
    Authored-by: erichanwang <[email protected]>
    Signed-off-by: David Li <[email protected]>
---
 .../arrow/flight/sql/odbc/tests/connection_info_test.cc  | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc 
b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc
index ff4abc59fa1..aec6d8f15b3 100644
--- a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc
+++ b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc
@@ -31,7 +31,7 @@ class ConnectionInfoTest : public T {};
 
 class ConnectionInfoMockTest : public FlightSQLODBCMockTestBase {};
 class ConnectionInfoRemoteTest : public FlightSQLODBCRemoteTestBase {};
-using TestTypes = ::testing::Types<ConnectionInfoMockTest, 
FlightSQLODBCRemoteTestBase>;
+using TestTypes = ::testing::Types<ConnectionInfoMockTest, 
ConnectionInfoRemoteTest>;
 TYPED_TEST_SUITE(ConnectionInfoTest, TestTypes);
 
 template <typename T>
@@ -711,6 +711,20 @@ TEST_F(ConnectionInfoMockTest, TestSQLGetInfoCreateTable) {
   EXPECT_EQ(static_cast<SQLUINTEGER>(1), value);
 }
 
+TEST_F(ConnectionInfoRemoteTest, TestSQLGetInfoCreateSchema) {
+  SQLUINTEGER value;
+  GetInfo(this->conn, SQL_CREATE_SCHEMA, &value);
+
+  EXPECT_EQ(static_cast<SQLUINTEGER>(0), value);
+}
+
+TEST_F(ConnectionInfoRemoteTest, TestSQLGetInfoCreateTable) {
+  SQLUINTEGER value;
+  GetInfo(this->conn, SQL_CREATE_TABLE, &value);
+
+  EXPECT_EQ(static_cast<SQLUINTEGER>(0), value);
+}
+
 TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoCreateTranslation) {
   SQLUINTEGER value;
   GetInfo(this->conn, SQL_CREATE_TRANSLATION, &value);

Reply via email to