()
| 447 | |
| 448 | #[test] |
| 449 | fn expire_sets_ttl() { |
| 450 | let mut e = make_engine(); |
| 451 | let n = now(); |
| 452 | |
| 453 | e.put(1, "cache", b"k", b"v", 0, n, Surrogate::ZERO); |
| 454 | assert!(e.get(1, "cache", b"k", n + 100_000).is_some()); // No TTL. |
| 455 | |
| 456 | assert!(e.expire(1, "cache", b"k", 2000, n)); |
| 457 | assert!(e.get(1, "cache", b"k", n + 1999).is_some()); |
| 458 | assert!(e.get(1, "cache", b"k", n + 2000).is_none()); // Expired. |
| 459 | } |
| 460 | |
| 461 | #[test] |
| 462 | fn batch_get_and_put() { |
nothing calls this directly
no test coverage detected