Skip to content

GH-49268: [C++][FlightRPC] Fix ODBC tests for MacOS#49267

Open
justing-bq wants to merge 3 commits intoapache:mainfrom
Bit-Quill:fixMacTests
Open

GH-49268: [C++][FlightRPC] Fix ODBC tests for MacOS#49267
justing-bq wants to merge 3 commits intoapache:mainfrom
Bit-Quill:fixMacTests

Conversation

@justing-bq
Copy link
Contributor

@justing-bq justing-bq commented Feb 12, 2026

Rationale for this change

Addresses #49268

What changes are included in this PR?

  • Fixed Mock Server setup to work on both Windows and MacOS.
  • Changed Mocker Server setup logic to happen once at the Test Environment level.
  • Changed test connect/disconnect logic to happen once per test fixture instead of once per test.
  • Disabled tests that are not appliable to MacOS (usually because iODBC doesn't support the relevant functionality).
  • Adjusted expected SQL States where different on Mac.
  • Fixed any tests failing on MacOS.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

@github-actions
Copy link

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

@justing-bq
Copy link
Contributor Author

justing-bq commented Feb 12, 2026

@lidavidm this draft PR is ready for review. Please take a look when you can.
This PR can be undrafted once we finish #49220.

@justing-bq justing-bq marked this pull request as ready for review February 12, 2026 20:48
@justing-bq justing-bq requested a review from lidavidm as a code owner February 12, 2026 20:48
@justing-bq justing-bq changed the title [C++][FlightRPC] Fix tests for MacOS [C++][FlightRPC] Fix ODBC tests for MacOS Feb 12, 2026
@justing-bq justing-bq changed the title [C++][FlightRPC] Fix ODBC tests for MacOS GH-49268: [C++][FlightRPC] Fix ODBC tests for MacOS Feb 12, 2026
@github-actions
Copy link

⚠️ GitHub issue #49268 has been automatically assigned in GitHub to PR creator.

@justing-bq justing-bq marked this pull request as draft February 12, 2026 21:08
@alinaliBQ alinaliBQ force-pushed the fixMacTests branch 6 times, most recently from 53d0e44 to af8035e Compare March 10, 2026 17:42
ValidateFetch(stmt, SQL_NO_DATA);

// Sizes are zeros
EXPECT_EQ(SQL_SUCCESS, SQLColumns(this->stmt, catalog_name, 0, schema_name, 0,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to reviewers: many of the PR's changes for removing this->

@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Mar 11, 2026
@justing-bq justing-bq marked this pull request as ready for review March 11, 2026 17:22
alinaliBQ and others added 3 commits March 11, 2026 10:24
Co-authored-by: justing-bq <justin.gossett@improving.com>
Co-authored-by: alinalibq <alina.li@improving.com>

Update test files

Refactor test setup/teardown to reuse connection across tests

* Define Mock Server SetUp/TearDown at Environment level

* Refactor test setup/teardown to reuse connection across tests

* In-progress fix DSN write issue on macOS without `sudo`

* Getting errors of `SQLSetConfigMode` flagged as `void`,

```
error: cannot initialize return object of type 'bool' with an rvalue of type 'void'
  502 |   ASSERT_TRUE(SQLSetConfigMode(ODBC_BOTH_DSN));
```

* Clean Up PR

* Remove unneeded changes

---------

Co-Authored-By: Alina (Xi) Li <alinal@bitquilltech.com>
Put `ODBCINST` before `ODBC_LIBRARIES` in terms of linking.

Co-Authored-By: Alina (Xi) Li <alinal@bitquilltech.com>
* Enable disabled tests

* Fix getinfo tests to use standalone connection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants