Gossip service implementation for cluster node autodiscovery with failure detection
This commit is contained in:
@@ -307,7 +307,7 @@ async fn init_imap_tests(store_id: &str, delete_if_exists: bool) -> IMAPTest {
|
||||
config.assert_no_errors();
|
||||
|
||||
// Spawn servers
|
||||
let shutdown_tx = servers.spawn(|server, acceptor, shutdown_rx| {
|
||||
let (shutdown_tx, _) = servers.spawn(|server, acceptor, shutdown_rx| {
|
||||
match &server.protocol {
|
||||
ServerProtocol::Smtp | ServerProtocol::Lmtp => server.spawn(
|
||||
SmtpSessionManager::new(smtp.clone()),
|
||||
|
||||
@@ -451,7 +451,7 @@ async fn init_jmap_tests(store_id: &str, delete_if_exists: bool) -> JMAPTest {
|
||||
config.assert_no_errors();
|
||||
|
||||
// Spawn servers
|
||||
let shutdown_tx = servers.spawn(|server, acceptor, shutdown_rx| {
|
||||
let (shutdown_tx, _) = servers.spawn(|server, acceptor, shutdown_rx| {
|
||||
match &server.protocol {
|
||||
ServerProtocol::Smtp | ServerProtocol::Lmtp => server.spawn(
|
||||
SmtpSessionManager::new(smtp.clone()),
|
||||
|
||||
@@ -159,25 +159,27 @@ impl TestServer {
|
||||
let jmap_manager = JmapSessionManager::new(jmap);
|
||||
config.assert_no_errors();
|
||||
|
||||
servers.spawn(|server, acceptor, shutdown_rx| {
|
||||
match &server.protocol {
|
||||
ServerProtocol::Smtp | ServerProtocol::Lmtp => server.spawn(
|
||||
smtp_manager.clone(),
|
||||
instance.core.clone(),
|
||||
acceptor,
|
||||
shutdown_rx,
|
||||
),
|
||||
ServerProtocol::Http => server.spawn(
|
||||
jmap_manager.clone(),
|
||||
instance.core.clone(),
|
||||
acceptor,
|
||||
shutdown_rx,
|
||||
),
|
||||
ServerProtocol::Imap | ServerProtocol::ManageSieve => {
|
||||
unreachable!()
|
||||
}
|
||||
};
|
||||
})
|
||||
servers
|
||||
.spawn(|server, acceptor, shutdown_rx| {
|
||||
match &server.protocol {
|
||||
ServerProtocol::Smtp | ServerProtocol::Lmtp => server.spawn(
|
||||
smtp_manager.clone(),
|
||||
instance.core.clone(),
|
||||
acceptor,
|
||||
shutdown_rx,
|
||||
),
|
||||
ServerProtocol::Http => server.spawn(
|
||||
jmap_manager.clone(),
|
||||
instance.core.clone(),
|
||||
acceptor,
|
||||
shutdown_rx,
|
||||
),
|
||||
ServerProtocol::Imap | ServerProtocol::ManageSieve => {
|
||||
unreachable!()
|
||||
}
|
||||
};
|
||||
})
|
||||
.0
|
||||
}
|
||||
|
||||
pub fn new_session(&self) -> Session<DummyIo> {
|
||||
|
||||
Reference in New Issue
Block a user