()
| 110 | |
| 111 | #[test] |
| 112 | fn test_wire_protocol_cache() { |
| 113 | let cache = WireProtocolCache::new(10); |
| 114 | |
| 115 | let response = CachedWireResponse { |
| 116 | row_description: vec![], |
| 117 | encoded_rows: vec![], |
| 118 | row_count: 0, |
| 119 | }; |
| 120 | |
| 121 | cache.put("SELECT 1".to_string(), response.clone()); |
| 122 | assert!(cache.get("SELECT 1").is_some()); |
| 123 | assert!(cache.get("SELECT 2").is_none()); |
| 124 | } |
| 125 | |
| 126 | #[test] |
| 127 | fn test_is_cacheable() { |