MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / circuit_breaker_triggers

Function circuit_breaker_triggers

nodedb/src/control/trigger/batch/partition.rs:127–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 3

partition_by_fieldFunction · 0.85
collectMethod · 0.80
row_with_fieldFunction · 0.70

Tested by

no test coverage detected