Skip to content

Rename testing hooks for consistency and clarity#60

Merged
bghgary merged 3 commits intomicrosoft:masterfrom
bghgary:refactor/test-hooks-namespace
Apr 10, 2026
Merged

Rename testing hooks for consistency and clarity#60
bghgary merged 3 commits intomicrosoft:masterfrom
bghgary:refactor/test-hooks-namespace

Conversation

@bghgary
Copy link
Copy Markdown
Contributor

@bghgary bghgary commented Apr 9, 2026

Rename testing hooks for consistency and clarity.

Changes

  • Rename macro ARCANA_TESTING_HOOKS to ARCANA_TEST_HOOKS to match the test_hooks namespace
  • Move hooks from arcana::detail / arcana::set_before_wait_callback to arcana::test_hooks::blocking_concurrent_queue namespace, accurately reflecting where the hook fires

Consumer call changes from:

#ifdef ARCANA_TESTING_HOOKS
arcana::set_before_wait_callback(...);

to:

#ifdef ARCANA_TEST_HOOKS
arcana::test_hooks::blocking_concurrent_queue::set_before_wait_callback(...);

bghgary and others added 3 commits April 9, 2026 13:38
More specific namespace makes it clear these hooks are for testing
the dispatcher's blocking_concurrent_queue, not general-purpose.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The hook lives in blocking_concurrent_queue, not dispatcher.
Using the accurate name makes it clear where the hook fires.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Consistent with the test_hooks namespace.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bghgary bghgary changed the title Move testing hooks to test_hooks::dispatcher namespace Rename testing hooks for consistency and clarity Apr 9, 2026
@bghgary bghgary marked this pull request as ready for review April 9, 2026 22:31
Copilot AI review requested due to automatic review settings April 9, 2026 22:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR renames and relocates the blocking_concurrent_queue test hook API to improve consistency with the test_hooks naming scheme and better indicate where the hook is triggered.

Changes:

  • Rename macro gate from ARCANA_TESTING_HOOKS to ARCANA_TEST_HOOKS.
  • Move the hook setter from the arcana/arcana::detail area into arcana::test_hooks::blocking_concurrent_queue.
  • Update internal wait sites to invoke the callback via the new namespace path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bghgary bghgary enabled auto-merge (squash) April 9, 2026 22:45
@bghgary bghgary merged commit b9bf9d8 into microsoft:master Apr 10, 2026
32 of 33 checks passed
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.

3 participants