Skip to content

Commit

Permalink
better doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Raz-Hemo authored and Raz-Hemo committed Jan 18, 2024
1 parent ba221e3 commit 3e28800
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/cached.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,7 @@ fn test_result_fallback() {
assert_eq!(cache.cache_misses(), Some(1));
}

// Pretend it succeeded once and will now never return an error again
// Pretend it succeeded once
ALWAYS_FAILING.lock().unwrap().cache_set((), 1);
assert_eq!(always_failing(), Ok(1));
{
Expand All @@ -1491,6 +1491,7 @@ fn test_result_fallback() {

std::thread::sleep(std::time::Duration::from_millis(2000));

// Even though the cache should've expired, the `result_fallback` flag means it refreshes the cache with the last valid result
assert_eq!(always_failing(), Ok(1));
{
let cache = ALWAYS_FAILING.lock().unwrap();
Expand Down

0 comments on commit 3e28800

Please sign in to comment.