Spawn a delivery thread for EmailSubmission/set requests (closes #1540)

This commit is contained in:
mdecimus
2025-05-23 13:03:11 +02:00
parent e2ce576596
commit a138fe33d6
7 changed files with 100 additions and 83 deletions

View File

@@ -240,7 +240,9 @@ async fn build_server(mut config: Config, stores: Stores) -> (Server, watch::Sen
const SERVER: &str = r#"
[server]
hostname = "'server{NODE_ID}.example.org'"
http.url = "'https://127.0.0.1:800{NODE_ID}'"
[http]
url = "'https://127.0.0.1:800{NODE_ID}'"
[cluster]
node-id = {NODE_ID}

View File

@@ -19,7 +19,9 @@ use crate::{AssertConfig, add_test_certs};
const MOCK_HTTP_SERVER: &str = r#"
[server]
hostname = "'oidc.example.org'"
http.url = "'https://127.0.0.1:9090'"
[http]
url = "'https://127.0.0.1:9090'"
[server.listener.jmap]
bind = ['127.0.0.1:9090']

View File

@@ -79,19 +79,8 @@ pub mod vacation_response;
pub mod webhooks;
pub mod websocket;
#[test]
fn jmap_tests() {
tokio::runtime::Builder::new_multi_thread()
.thread_stack_size(3 * 1024 * 1024)
.enable_all()
.build()
.unwrap()
.block_on(async {
jmap_tests_().await;
})
}
async fn jmap_tests_() {
#[tokio::test(flavor = "multi_thread")]
async fn jmap_tests() {
let delete = true;
let mut params = init_jmap_tests(
&std::env::var("STORE")
@@ -100,8 +89,8 @@ async fn jmap_tests_() {
)
.await;
/*webhooks::test(&mut params).await;
email_query::test(&mut params, delete).await;
webhooks::test(&mut params).await;
/*email_query::test(&mut params, delete).await;
email_get::test(&mut params).await;
email_set::test(&mut params).await;
email_parse::test(&mut params).await;
@@ -113,11 +102,11 @@ async fn jmap_tests_() {
thread_merge::test(&mut params).await;
mailbox::test(&mut params).await;
delivery::test(&mut params).await;
auth_acl::test(&mut params).await;
auth_acl::test(&mut params).await;*/
auth_limits::test(&mut params).await;
auth_oauth::test(&mut params).await;
event_source::test(&mut params).await;
push_subscription::test(&mut params).await;*/
push_subscription::test(&mut params).await;
sieve_script::test(&mut params).await;
vacation_response::test(&mut params).await;
email_submission::test(&mut params).await;
@@ -736,7 +725,9 @@ impl<T: Debug> Response<T> {
const SERVER: &str = r#"
[server]
hostname = "'jmap.example.org'"
http.url = "'https://127.0.0.1:8899'"
[http]
url = "'https://127.0.0.1:8899'"
[server.listener.jmap]
bind = ["127.0.0.1:8899"]

View File

@@ -40,7 +40,9 @@ use super::JMAPTest;
const SERVER: &str = r#"
[server]
hostname = "'jmap-push.example.org'"
http.url = "'https://127.0.0.1:9000'"
[http]
url = "'https://127.0.0.1:9000'"
[server.listener.jmap]
bind = ['127.0.0.1:9000']

View File

@@ -966,7 +966,9 @@ fn generate_random_name(length: usize) -> String {
const SERVER: &str = r#"
[server]
hostname = "webdav.example.org"
http.url = "'https://127.0.0.1:8899'"
[http]
url = "'https://127.0.0.1:8899'"
[server.listener.webdav]
bind = ["127.0.0.1:8899"]