File tree Expand file tree Collapse file tree
core/src/commonIntegrationTest/kotlin/com/powersync Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -559,14 +559,16 @@ class AttachmentsTest {
559559 """ ,
560560 )
561561
562+ // Depending on when the query updates, we'll see the attachment as queued for
563+ // download or archived.
562564 var attachmentRecord = attachmentQuery.awaitItem().first()
563565 attachmentRecord shouldNotBe null
564566
565- attachmentRecord.state shouldBe AttachmentState .QUEUED_DOWNLOAD
567+ if (attachmentRecord.state == AttachmentState .QUEUED_DOWNLOAD ) {
568+ attachmentRecord = attachmentQuery.awaitItem().first()
569+ }
566570
567571 // The download should fail. We don't specify a retry. The record should be archived.
568- attachmentRecord = attachmentQuery.awaitItem().first()
569-
570572 attachmentRecord.state shouldBe AttachmentState .ARCHIVED
571573
572574 attachmentQuery.cancelAndIgnoreRemainingEvents()
You can’t perform that action at this time.
0 commit comments