From 970860d71937dddcc0543b8a76ce496d341a5ced Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 29 Sep 2026 16:36:51 +0200 Subject: test: keep the cron-drain test off the real sync status aSuccessfulCronSyncDrainsTheEditedAccounts named a log but no status file, so Config fell back to ~/.local/state/qtmaildir/syncstatus.json and the test passed or failed on the developer's last cron run. Co-Authored-By: Claude Opus 5.5 --- tests/test_mainwindow.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/test_mainwindow.cpp') diff --git a/tests/test_mainwindow.cpp b/tests/test_mainwindow.cpp index f6f75aa..f008b10 100644 --- a/tests/test_mainwindow.cpp +++ b/tests/test_mainwindow.cpp @@ -7455,11 +7455,15 @@ void TestMainWindow::aSuccessfulCronSyncDrainsTheEditedAccounts() const QString confPath = dir.filePath(QStringLiteral("qtmaildir.conf")); QFile conf(confPath); QVERIFY(conf.open(QIODevice::WriteOnly | QIODevice::Text)); - conf.write(QStringLiteral("[sync]\nlog=%1\n\n" + // status= keeps Config off the real syncstatus.json, the leak + // noSyncTestReadsTheRealSyncState() records; this test missed it and + // failed whenever the developer's last cron run left a channel queued. + conf.write(QStringLiteral("[sync]\nlog=%1\nstatus=%2\n\n" "[account.work]\n" "maildir=work-mail\n" "channel=work-channel\n") - .arg(logPath).toUtf8()); + .arg(logPath, dir.filePath(QStringLiteral("no-status.json"))) + .toUtf8()); conf.close(); Config config; -- cgit v1.2.3