Skip to content

Conversation

alinaliBQ
Copy link
Contributor

@alinaliBQ alinaliBQ commented Oct 8, 2025

Rationale for this change

Putting the tests for diagnostics in a separate PR from #47763, because non-diagnostic ODBC APIs are required to get diagnostics.

What changes are included in this PR?

  • Add tests for ODBC diagnostics

Are these changes tested?

Will be tested in CI when PR is ready for review

Are there any user-facing changes?

No

Requires SQLDriverConnect Implementation
Co-authored-by: rscales <[email protected]>
@alinaliBQ
Copy link
Contributor Author

@lidavidm @kou Please review this draft ODBC API PR. The implementation PR is at #47763.


namespace arrow::flight::sql::odbc {

TYPED_TEST(FlightSQLODBCTestBase, TestSQLGetDiagFieldWForConnectFailure) {
Copy link
Member

Choose a reason for hiding this comment

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

Same comment here, we can subclass the base fixture and create a specific fixture for this file.

// Allocate an environment handle
SQLRETURN ret = SQLAllocEnv(&env);

EXPECT_EQ(SQL_SUCCESS, ret);
Copy link
Member

Choose a reason for hiding this comment

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

The test will continue even if EXPECT_ fails. Usually these kinds of checks should be ASSERT.

Copy link
Member

Choose a reason for hiding this comment

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

It would be more concise to just ASSERT_EQ(SQL_SUCCESS, SQLAllocEnv(&env)) and so on.

Comment on lines +137 to +139
// Test is disabled because driver manager on Windows does not pass through SQL_NTS
// This test case can be potentially used on macOS/Linux
GTEST_SKIP();
Copy link
Member

Choose a reason for hiding this comment

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

If the test name starts with DISABLED_, GTest will ignore the test automatically

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Oct 9, 2025
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