File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
core/src/commonIntegrationTest/kotlin/com/powersync Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -559,14 +559,16 @@ class AttachmentsTest {
559
559
""" ,
560
560
)
561
561
562
+ // Depending on when the query updates, we'll see the attachment as queued for
563
+ // download or archived.
562
564
var attachmentRecord = attachmentQuery.awaitItem().first()
563
565
attachmentRecord shouldNotBe null
564
566
565
- attachmentRecord.state shouldBe AttachmentState .QUEUED_DOWNLOAD
567
+ if (attachmentRecord.state == AttachmentState .QUEUED_DOWNLOAD ) {
568
+ attachmentRecord = attachmentQuery.awaitItem().first()
569
+ }
566
570
567
571
// The download should fail. We don't specify a retry. The record should be archived.
568
- attachmentRecord = attachmentQuery.awaitItem().first()
569
-
570
572
attachmentRecord.state shouldBe AttachmentState .ARCHIVED
571
573
572
574
attachmentQuery.cancelAndIgnoreRemainingEvents()
You can’t perform that action at this time.
0 commit comments