From f8041ee1a457f878111a3b5dd5ac939e546bf720 Mon Sep 17 00:00:00 2001 From: trevor-signal <131492920+trevor-signal@users.noreply.github.com> Date: Thu, 3 Oct 2024 13:32:54 -0400 Subject: [PATCH] Reduce Windows CI flake for backup attachments test --- ts/services/backups/import.ts | 6 +++++- ts/test-electron/backup/attachments_test.ts | 1 + ts/test-electron/backup/helpers.ts | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ts/services/backups/import.ts b/ts/services/backups/import.ts index c24d43f1f45b..c7381a059ab9 100644 --- a/ts/services/backups/import.ts +++ b/ts/services/backups/import.ts @@ -110,6 +110,7 @@ import { getRoomIdFromRootKey } from '../../util/callLinksRingrtc'; import { reinitializeRedux } from '../../state/reinitializeRedux'; import { getParametersForRedux, loadAll } from '../allLoaders'; import { resetBackupMediaDownloadProgress } from '../../util/backupMediaDownload'; +import { getEnvironment, isTestEnvironment } from '../../environment'; const MAX_CONCURRENCY = 10; @@ -415,7 +416,10 @@ export class BackupImportStream extends Writable { await DataReader.getSizeOfPendingBackupAttachmentDownloadJobs() ); - if (this.backupType !== BackupType.TestOnlyPlaintext) { + if ( + this.backupType !== BackupType.TestOnlyPlaintext && + !isTestEnvironment(getEnvironment()) + ) { await AttachmentDownloadManager.start(); } diff --git a/ts/test-electron/backup/attachments_test.ts b/ts/test-electron/backup/attachments_test.ts index acd6387be5c2..6bee7739fe04 100644 --- a/ts/test-electron/backup/attachments_test.ts +++ b/ts/test-electron/backup/attachments_test.ts @@ -122,6 +122,7 @@ describe('backup/attachments', () => { received_at_ms: timestamp, sourceServiceId: CONTACT_A, sourceDevice: 1, + schemaVersion: 0, sent_at: timestamp, timestamp, readStatus: ReadStatus.Read, diff --git a/ts/test-electron/backup/helpers.ts b/ts/test-electron/backup/helpers.ts index d09f99077d6e..c5089652a3af 100644 --- a/ts/test-electron/backup/helpers.ts +++ b/ts/test-electron/backup/helpers.ts @@ -80,6 +80,8 @@ function sortAndNormalize( sourceDevice: _sourceDevice, // eslint-disable-next-line @typescript-eslint/no-unused-vars editMessageReceivedAt: _editMessageReceivedAt, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + schemaVersion: _schemaVersion, ...rest } = message;