Merged
Conversation
2095bf9 to
23a484c
Compare
findepi
commented
Oct 6, 2022
23a484c to
0dd7857
Compare
losipiuk
reviewed
Oct 7, 2022
lib/trino-collect/src/test/java/io/trino/collect/cache/TestEvictableCache.java
Outdated
Show resolved
Hide resolved
losipiuk
reviewed
Oct 7, 2022
Member
There was a problem hiding this comment.
nit: extract 10_000 to variable
Member
Author
There was a problem hiding this comment.
i chose not to apply this one, hope it's fine
losipiuk
reviewed
Oct 7, 2022
lib/trino-collect/src/test/java/io/trino/collect/cache/TestEvictableCache.java
Outdated
Show resolved
Hide resolved
losipiuk
reviewed
Oct 7, 2022
losipiuk
reviewed
Oct 7, 2022
lib/trino-collect/src/test/java/io/trino/collect/cache/TestEvictableLoadingCache.java
Outdated
Show resolved
Hide resolved
losipiuk
approved these changes
Oct 7, 2022
It was recently discovered we lack a test ensuring that time-based cache has it's entries evicted, and not e.g. using unbounded amount of memory.
0dd7857 to
02a4626
Compare
Member
Author
|
AC |
findepi
commented
Oct 10, 2022
| ticker.increment(ttl, MILLISECONDS); | ||
| // Should be reloaded | ||
| assertEquals(cache.get(key, () -> "new value"), "new value"); | ||
| // TODO (https://github.com/trinodb/trino/issues/14545) tokensCount should be 1; 0 means we lost the token for a live entry |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #14476 (comment) it became apparent we have no tests ensuring no memory leak in EvictableCache. This PR improves test coverage around that.