feat: handle the downgrade region instruction (#2855)

* feat: handle the downgrade region instruction

* test: add tests for RegionHeartbeatResponseHandler

* refactor: remove unused code
This commit is contained in:
Weny Xu
2023-12-05 12:30:55 +09:00
committed by GitHub
parent d6ef7a75de
commit b3ffe5cd1e
8 changed files with 373 additions and 151 deletions

View File

@@ -37,7 +37,7 @@ pub struct HeartbeatResponseHandlerContext {
/// HandleControl
///
/// Controls process of handling heartbeat response.
#[derive(PartialEq)]
#[derive(Debug, PartialEq)]
pub enum HandleControl {
Continue,
Done,

View File

@@ -30,8 +30,8 @@ pub struct MessageMeta {
pub from: String,
}
#[cfg(test)]
impl MessageMeta {
#[cfg(any(test, feature = "testing"))]
pub fn new_test(id: u64, subject: &str, to: &str, from: &str) -> Self {
MessageMeta {
id,