Try to fix test_delete_multiple_messages(), remove some commented-out code, add some comments

This commit is contained in:
Hocuri
2026-05-06 15:16:31 +02:00
parent d315257fb1
commit 2bc53fa717
5 changed files with 13 additions and 67 deletions

View File

@@ -511,30 +511,6 @@ async fn test_delete_expired_imap_messages() -> Result<()> {
0
);
// t.set_config(Config::DeleteServerAfter, Some(&*(25 * HOUR).to_string()))
// .await?;
// delete_expired_imap_messages(&t).await?;
// test_marked_for_deletion(&t, 1000).await?;
// MsgId::new(1000)
// .update_download_state(&t, DownloadState::Available)
// .await?;
// t.sql
// .execute("UPDATE imap SET target=folder WHERE rfc724_mid='1000'", ())
// .await?;
// delete_expired_imap_messages(&t).await?;
// test_marked_for_deletion(&t, 1000).await?; // Delete downloadable anyway.
// remove_uid(&t, 1000).await?;
// t.set_config(Config::DeleteServerAfter, Some(&*(22 * HOUR).to_string()))
// .await?;
// delete_expired_imap_messages(&t).await?;
// test_marked_for_deletion(&t, 1010).await?;
// t.sql
// .execute("UPDATE imap SET target=folder WHERE rfc724_mid='1010'", ())
// .await?;
// TODO check if removing this code makes the test fail
MsgId::new(1010)
.update_download_state(&t, DownloadState::Available)
.await?;
@@ -547,11 +523,6 @@ async fn test_delete_expired_imap_messages() -> Result<()> {
0
);
// TODO instead, test that setting bcc_self to 0 removes messages
// t.set_config(Config::DeleteServerAfter, Some("1")).await?;
// delete_expired_imap_messages(&t).await?;
// test_marked_for_deletion(&t, 3000).await?;
Ok(())
}