Skip to content

Commit f2c0035

Browse files
committed
Properly cancel turbine
1 parent 33be624 commit f2c0035

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

core/src/commonIntegrationTest/kotlin/com/powersync/AttachmentsTest.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class AttachmentsTest {
176176
val exists = queue.localStorage.fileExists(localUri)
177177
exists shouldBe false
178178

179-
attachmentQuery.cancel()
179+
attachmentQuery.cancelAndIgnoreRemainingEvents()
180180
}
181181
}
182182

@@ -286,7 +286,7 @@ class AttachmentsTest {
286286
// The file should have been deleted from storage
287287
queue.localStorage.fileExists(localUri) shouldBe false
288288

289-
attachmentQuery.cancel()
289+
attachmentQuery.cancelAndIgnoreRemainingEvents()
290290
}
291291
}
292292

@@ -385,7 +385,7 @@ class AttachmentsTest {
385385
)
386386
}
387387

388-
attachmentQuery.cancel()
388+
attachmentQuery.cancelAndIgnoreRemainingEvents()
389389
}
390390
}
391391

@@ -497,7 +497,7 @@ class AttachmentsTest {
497497
attachmentRecord = attachmentQuery.awaitItem().first()
498498
attachmentRecord.state shouldBe AttachmentState.SYNCED
499499

500-
attachmentQuery.cancel()
500+
attachmentQuery.cancelAndIgnoreRemainingEvents()
501501
}
502502
}
503503

@@ -579,7 +579,7 @@ class AttachmentsTest {
579579

580580
attachmentRecord.state shouldBe AttachmentState.ARCHIVED
581581

582-
attachmentQuery.cancel()
582+
attachmentQuery.cancelAndIgnoreRemainingEvents()
583583
}
584584
}
585585
}

0 commit comments

Comments
 (0)