Skip to content

Conversation

@ldematte
Copy link
Contributor

This PR refactors CagraBuildAndSearchIT, introducing separate test for different execution modes (same thread, different thread, concurrent).
This way different modes are tested every time, without the need to rely on randomization to hit a particular test path.
The execution is handled by utility functions (e.g. runConcurrently); right now these are private to the test suite, but if we think they could be useful across other tests I can move them to a utility class.

It also fixes a issue where we did not wait and/or report failures in the concurrent case (now exceptions are propagated back to the calling JUnit thread).

@copy-pr-bot
Copy link

copy-pr-bot bot commented Jun 11, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Copy link
Contributor

@ChrisHegarty ChrisHegarty left a comment

Choose a reason for hiding this comment

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

Thanks for checking on this, and for improving the test. LGTM

@ChrisHegarty
Copy link
Contributor

ChrisHegarty commented Jun 11, 2025

It also fixes a issue where we did not wait and/or report failures in the concurrent case (now exceptions are propagated back to the calling JUnit thread).

This is an important and significant point, which I want to emphasise - it's the reason why the bug reported in #764 went unnoticed.

@cjnolet cjnolet added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Jun 11, 2025
@cjnolet
Copy link
Member

cjnolet commented Jun 11, 2025

/ok to test 2f1942b

@cjnolet
Copy link
Member

cjnolet commented Jun 11, 2025

/ok to test ea583c8

Copy link
Contributor

@mythrocks mythrocks left a comment

Choose a reason for hiding this comment

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

I really like this refactor.

@cjnolet
Copy link
Member

cjnolet commented Jun 12, 2025

/merge

@rapids-bot rapids-bot bot merged commit 9c4bb73 into rapidsai:branch-25.08 Jun 12, 2025
53 checks passed
@mythrocks
Copy link
Contributor

It looks like the PR merged with the [REVIEW] tag in the title. :/ We'll catch that the next time around.

@cjnolet
Copy link
Member

cjnolet commented Jun 12, 2025

It looks like the PR merged with the [REVIEW] tag in the title. :/ We'll catch that the next time around.

@mythrocks once a PR is set to review, it's ready for merge if it's approved. The only time we won't review/merge is if it has WIP In the title.

bkarsin pushed a commit to bkarsin/cuvs that referenced this pull request Jun 19, 2025
…ifferent execution modes (rapidsai#1006)

This PR refactors `CagraBuildAndSearchIT`, introducing separate test for different execution modes (same thread, different thread, concurrent).
This way different modes are tested every time, without the need to rely on randomization to hit a particular test path.
The execution is handled by utility functions (e.g. `runConcurrently`); right now these are private to the test suite, but if we think they could be useful across other tests I can move them to a utility class.

It also fixes a issue where we did not wait and/or report failures in the concurrent case (now exceptions are propagated back to the calling JUnit thread).

Authors:
  - Lorenzo Dematté (https://github.com/ldematte)
  - Corey J. Nolet (https://github.com/cjnolet)

Approvers:
  - Chris Hegarty (https://github.com/ChrisHegarty)
  - MithunR (https://github.com/mythrocks)

URL: rapidsai#1006
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Development

Successfully merging this pull request may close these issues.

4 participants