Skip to content

Refactor test setup/teardown to reuse connection across tests#155

Open
justing-bq wants to merge 2 commits intoapache-odbcfrom
mockTestSetupTeardown
Open

Refactor test setup/teardown to reuse connection across tests#155
justing-bq wants to merge 2 commits intoapache-odbcfrom
mockTestSetupTeardown

Conversation

@justing-bq
Copy link

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

Rationale for this change

Possible workaround to apache#49207 because it involves fewer setups/teardowns.

What changes are included in this PR?

Our mock test Setup/Teardown logic now happens once at the environment level.
Our test connect/disconnect now happens once per test fixture instead of once per test.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

@justing-bq justing-bq force-pushed the mockTestSetupTeardown branch 2 times, most recently from 183fa4d to 2922812 Compare February 11, 2026 19:37
@justing-bq justing-bq changed the title Handle mock setup/teardown at test suite level Handle mock setup/teardown at test environment level Feb 11, 2026
@justing-bq justing-bq force-pushed the mockTestSetupTeardown branch from 2922812 to 1f59664 Compare February 18, 2026 19:53
@justing-bq justing-bq changed the title Handle mock setup/teardown at test environment level Refactor test setup/teardown to reuse connection across tests Feb 18, 2026
@justing-bq justing-bq force-pushed the mockTestSetupTeardown branch from 1f59664 to e740c26 Compare February 18, 2026 21:06
Comment on lines 428 to 430
ulimit -c unlimited # must enable within the same shell
ci/scripts/cpp_test.sh $(pwd) $(pwd)/build
sudo ci/scripts/cpp_test.sh $(pwd) $(pwd)/build

Choose a reason for hiding this comment

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

I see the ODBC tests are passing on macOS CI which is awesome! This error is interesting:

  Could not find a package configuration file provided by "Arrow" with any of
  the following names:

    ArrowConfig.cmake
    arrow-config.cmake

From run: https://github.com/Bit-Quill/arrow/actions/runs/22157630099/job/64065881526?pr=155

Choose a reason for hiding this comment

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

seems this line CMAKE_PREFIX_PATH= empty is the reason why the run fails.

@alinaliBQ alinaliBQ self-requested a review February 23, 2026 23:40
Copy link

@alinaliBQ alinaliBQ left a comment

Choose a reason for hiding this comment

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

Rest of PR LGTM

@alinaliBQ
Copy link

As discussed, let's work on the ifdef disabled tests in a separate PR

@justing-bq justing-bq force-pushed the mockTestSetupTeardown branch 2 times, most recently from ef007f3 to 8dd4bcf Compare February 25, 2026 19:15
@@ -41,78 +41,76 @@
static constexpr std::string_view kTestConnectStr = "ARROW_FLIGHT_SQL_ODBC_CONN";

Choose a reason for hiding this comment

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

Let's try setting the dsn into user DSN to avoid the sudo issue

Choose a reason for hiding this comment

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

Another option is to try CMAKE_PREFIX_PATH: /tmp/local with sudo on

@justing-bq justing-bq force-pushed the mockTestSetupTeardown branch from 8dd4bcf to 227afb8 Compare February 26, 2026 22:28
@justing-bq justing-bq force-pushed the mockTestSetupTeardown branch from 227afb8 to c9212b8 Compare February 26, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants