Skip to content

Commit 55ef17c

Browse files
authored
Merge pull request #140 from powersync-ja/update-core
Update core extension to 0.3.12
2 parents 78e49d7 + 5136934 commit 55ef17c

File tree

3 files changed

+50
-1
lines changed

3 files changed

+50
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.0.0-BETA28
4+
5+
* Update PowerSync SQLite core extension to 0.3.12.
6+
37
## 1.0.0-BETA27
48

59
* Improved watch query internals. Added the ability to throttle watched queries.

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

+45
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,51 @@ class SyncIntegrationTest {
267267
turbine.cancel()
268268
}
269269

270+
database.close()
271+
syncLines.close()
272+
}
273+
274+
@Test
275+
fun testMultipleSyncsDoNotCreateMultipleStatusEntries() =
276+
runTest {
277+
val syncStream = syncStream()
278+
database.connect(syncStream, 1000L)
279+
280+
turbineScope(timeout = 10.0.seconds) {
281+
val turbine = database.currentStatus.asFlow().testIn(this)
282+
turbine.waitFor { it.connected && !it.downloading }
283+
284+
repeat(5) {
285+
syncLines.send(
286+
SyncLine.FullCheckpoint(
287+
Checkpoint(
288+
lastOpId = "1",
289+
checksums =
290+
listOf(
291+
BucketChecksum(
292+
bucket = "bkt",
293+
checksum = 0,
294+
),
295+
),
296+
),
297+
),
298+
)
299+
turbine.waitFor { it.downloading }
300+
301+
syncLines.send(SyncLine.CheckpointComplete(lastOpId = "1"))
302+
turbine.waitFor { !it.downloading }
303+
304+
val rows =
305+
database.getAll("SELECT * FROM ps_sync_state;") {
306+
it.getString(1)!!
307+
}
308+
309+
assertEquals(1, rows.size)
310+
}
311+
312+
turbine.cancel()
313+
}
314+
270315
database.close()
271316
syncLines.close()
272317
}

gradle/libs.versions.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ kotlinx-datetime = "0.5.0"
1515
kotlinx-io = "0.5.4"
1616
ktor = "3.0.1"
1717
uuid = "0.8.2"
18-
powersync-core = "0.3.11"
18+
powersync-core = "0.3.12"
1919
sqlite-android = "3.45.0"
2020
sqlite-jdbc = "3.45.2.0"
2121
turbine = "1.2.0"

0 commit comments

Comments
 (0)