test: stabilize test_detect_deadlock_when_shuffle_region
@@ -101,6 +101,8 @@ fn must_transfer_leader(cluster: &mut Cluster<ServerCluster>, region_key: &[u8],
cluster
.pd_client
.region_leader_must_be(region.get_id(), target_peer);
+ // Make sure the new leader can get snapshot locally.
+ cluster.must_get(region_key);
}
fn find_peer_of_store(region: &Region, store_id: u64) -> Peer {
