Refactored local delivery to avoid mpsc channel
This commit is contained in:
@@ -173,7 +173,7 @@ impl TestSMTP {
|
||||
}
|
||||
|
||||
pub fn inner_with_rxs(&self) -> (Arc<Inner>, IpcReceivers) {
|
||||
let (ipc, ipc_rxs) = build_ipc();
|
||||
let (ipc, ipc_rxs) = build_ipc(&mut Config::default());
|
||||
|
||||
(
|
||||
Inner {
|
||||
@@ -191,7 +191,7 @@ impl TestSMTP {
|
||||
let store = core.storage.data.clone();
|
||||
let blob_store = core.storage.blob.clone();
|
||||
let shared_core = core.into_shared();
|
||||
let (ipc, mut ipc_rxs) = build_ipc();
|
||||
let (ipc, mut ipc_rxs) = build_ipc(&mut Config::default());
|
||||
|
||||
TestSMTP {
|
||||
queue_receiver: QueueReceiver {
|
||||
|
||||
@@ -43,7 +43,7 @@ enable = false
|
||||
|
||||
"#;
|
||||
|
||||
const NUM_MESSAGES: usize = 1000;
|
||||
const NUM_MESSAGES: usize = 100;
|
||||
const NUM_QUEUES: usize = 10;
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 18)]
|
||||
@@ -108,7 +108,7 @@ async fn concurrent_queue() {
|
||||
// Send 1000 test messages
|
||||
for _ in 0..(NUM_MESSAGES / 2) {
|
||||
session
|
||||
.send_message("john@test.org", &["slow@foobar.org"], "test:no_dkim", "250")
|
||||
.send_message("john@test.org", &["bill@foobar.org"], "test:no_dkim", "250")
|
||||
.await;
|
||||
}
|
||||
|
||||
@@ -135,14 +135,14 @@ async fn concurrent_queue() {
|
||||
|
||||
if m + e != 0 {
|
||||
println!("Queue still has {} messages and {} events", m, e);
|
||||
for inner in &inners {
|
||||
/*for inner in &inners {
|
||||
inner
|
||||
.ipc
|
||||
.queue_tx
|
||||
.send(QueueEvent::Paused(true))
|
||||
.send(QueueEvent::Refresh)
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
}*/
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user