Skip to content

Commit

Permalink
Fix test around releasing intermediate versions (#1509)
Browse files Browse the repository at this point in the history
  • Loading branch information
rorbech authored Sep 8, 2023
1 parent 3918a93 commit 24b19c2
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,15 @@ class MemoryTests {

// Perform various writes and deletes and garbage collect the references to allow core to
// release the underlying versions
val referenceHolder = mutableListOf<MemoryTest>()
for (i in 1..3) {
val referenceHolder = mutableListOf<MemoryTest>()
realm.writeBlocking {
for (i in 1..10) {
for (i in 1..10) {
val y: MemoryTest = realm.writeBlocking {
copyToRealm(MemoryTest()).apply {
stringField = oneMBstring
}.also { referenceHolder.add(it) }
}
}
referenceHolder.add(y)
}
realm.writeBlocking {
delete(query<MemoryTest>("stringField != 'INITIAL'"))
Expand Down

0 comments on commit 24b19c2

Please sign in to comment.