Skip to content

[cache_unittest] Add direct implementation testing on ordering, pruning (backport #678) - #687

Merged
ahcorde merged 1 commit into
jazzyfrom
mergify/bp/jazzy/pr-678
May 24, 2024
Merged

ahcorde merged 1 commit into
jazzyfrom
mergify/bp/jazzy/pr-678

Conversation

@mergify

@mergify mergify Bot commented May 24, 2024

Copy link
Copy Markdown
Contributor

Towards #676
This changes nothing pertaining to the implementation. It only adds testing.
Some of it is implementation-specific, but towards the ends of performance checks.

From #676 (comment)

  1. It needs to hold an arbitrary number of entries, because we don't know the rate at which we will get data.
  2. The items needs to be in sorted order by timestamp, from the newest entry to the oldest.
  3. New items need to be inserted into arbitrary positions, as timestamps may come in out-of-order.
  4. Duplicates shouldn't be allowed.
  5. Old items need to be pruned out.

To answer them:

  1. There appears to be no limit on size. Not sure how to test this in a bounded fashion.
  2. This was not tested. Now explicitly tested via ImplSortedDescendingUniqueEntries
  3. This was not tested. Now explicitly tested via ImplSortedDescendingUniqueEntries
  4. This was already tested, but is also explicitly tested via ImplSortedDescendingUniqueEntries
  5. This was not tested (I believe). Now explicitly tested via ImplSortedDescendingUniqueEntries
    This is an automatic backport of pull request [cache_unittest] Add direct implementation testing on ordering, pruning #678 done by Mergify.

…ng (#678)

* [cache_unittest] Add direct implementation testing on ordering, pruning

* do getAllItems() approach

* Return a reference instead.

* mark getAllItems as internal

* Fix warning on Windows.

Co-authored-by: Chris Lalancette <[email protected]>
(cherry picked from commit a17a2bf)

@ahcorde ahcorde left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@ahcorde
ahcorde merged commit 65d84b9 into jazzy May 24, 2024
@delete-merged-branch
delete-merged-branch Bot deleted the mergify/bp/jazzy/pr-678 branch May 24, 2024 22:13
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