()
| 435 | |
| 436 | #[test] |
| 437 | fn persist_removes_ttl() { |
| 438 | let mut e = make_engine(); |
| 439 | let n = now(); |
| 440 | |
| 441 | e.put(1, "cache", b"k", b"v", 3000, n, Surrogate::ZERO); |
| 442 | assert!(e.persist(1, "cache", b"k")); |
| 443 | |
| 444 | // Should never expire now. |
| 445 | assert!(e.get(1, "cache", b"k", n + 100_000).is_some()); |
| 446 | } |
| 447 | |
| 448 | #[test] |
| 449 | fn expire_sets_ttl() { |
nothing calls this directly
no test coverage detected