You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cache: Add ability to manually advance "now" for mock cache (#601)
Add an `.Advance()` method to MockCache and InstrumentedMockCache to
allow the time considered "now" to be moved without needing to actually
sleep. This is useful for testing when items are set with a TTL and you
would like for them to actually expire as they would in a real cache.
Part of grafana/mimir#9386
Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -232,6 +232,7 @@
232
232
*[ENHANCEMENT] grpcclient: Support custom gRPC compressors. #583
233
233
*[ENHANCEMENT] Adapt `metrics.SendSumOfGaugesPerTenant` to use `metrics.MetricOption`. #584
234
234
*[ENHANCEMENT] Cache: Add `.Add()` and `.Set()` methods to cache clients. #591
235
+
*[ENHANCEMENT] Cache: Add `.Advance()` methods to mock cache clients for easier testing of TTLs. #601
235
236
*[CHANGE] Backoff: added `Backoff.ErrCause()` which is like `Backoff.Err()` but returns the context cause if backoff is terminated because the context has been canceled. #538
236
237
*[BUGFIX] spanlogger: Support multiple tenant IDs. #59
237
238
*[BUGFIX] Memberlist: fixed corrupted packets when sending compound messages with more than 255 messages or messages bigger than 64KB. #85
0 commit comments