()
| 351 | |
| 352 | #[test] |
| 353 | fn hot_split_plan() { |
| 354 | let mut topo = ClusterTopology::new(); |
| 355 | let addr1: SocketAddr = "127.0.0.1:9000".parse().unwrap(); |
| 356 | let addr2: SocketAddr = "127.0.0.1:9001".parse().unwrap(); |
| 357 | topo.add_node(NodeInfo::new(1, addr1, NodeState::Active)); |
| 358 | topo.add_node(NodeInfo::new(2, addr2, NodeState::Active)); |
| 359 | |
| 360 | // uniform(2, ...) creates data groups 1 and 2 (+ metadata group 0). |
| 361 | let routing = RoutingTable::uniform(2, &[1, 2], 1); |
| 362 | let moves = plan_hot_split(1, &routing, &topo).unwrap(); |
| 363 | // Data group 1 has 512 vShards → split moves up to 256. |
| 364 | assert!(!moves.is_empty()); |
| 365 | assert!(moves.len() <= 512); |
| 366 | } |
| 367 | } |
nothing calls this directly
no test coverage detected