()
| 125 | |
| 126 | #[test] |
| 127 | fn circuit_breaker_triggers() { |
| 128 | let rows: Vec<_> = (0..50) |
| 129 | .map(|i| row_with_field(&format!("r{i}"), "id", &format!("val{i}"))) |
| 130 | .collect(); |
| 131 | |
| 132 | match partition_by_field(&rows, "id", 10) { |
| 133 | PartitionResult::CircuitBroken { partition_count } => { |
| 134 | assert!(partition_count > 10); |
| 135 | } |
| 136 | PartitionResult::Partitions(_) => panic!("expected circuit break"), |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | #[test] |
| 141 | fn single_partition() { |
nothing calls this directly
no test coverage detected