Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions cpp/src/arrow/flight/sql/odbc/tests/odbc_test_suite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,17 @@ std::wstring ODBCRemoteTestBase::GetQueryAllDataTypes() {

void ODBCRemoteTestBase::SetUp() {
if (arrow::internal::GetEnvVar(kTestConnectStr.data()).ValueOr("").empty()) {
skipping_test_ = true;
GTEST_SKIP() << "Skipping test: kTestConnectStr not set";
}
}

void FlightSQLODBCRemoteTestBase::SetUp() {
ODBCRemoteTestBase::SetUp();
if (skipping_test_) {
return;
}

this->Connect();
connected_ = true;
}
Expand All @@ -165,6 +170,10 @@ void FlightSQLODBCRemoteTestBase::TearDown() {

void FlightSQLOdbcV2RemoteTestBase::SetUp() {
ODBCRemoteTestBase::SetUp();
if (skipping_test_) {
return;
}

this->Connect(SQL_OV_ODBC2);
connected_ = true;
}
Expand Down
2 changes: 2 additions & 0 deletions cpp/src/arrow/flight/sql/odbc/tests/odbc_test_suite.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ class ODBCRemoteTestBase : public ::testing::Test {

protected:
void SetUp() override;

bool skipping_test_ = false;
};

/// \brief Base test fixture for running tests against a remote server.
Expand Down
Loading