Skip to content

Commit 305f9f8

Browse files
committed
test(bulk-model-sync-gradle): use assertContentEquals instead of looping
1 parent 84290a0 commit 305f9f8

File tree

1 file changed

+3
-5
lines changed
  • bulk-model-sync-gradle-test/src/test/kotlin/org/modelix/model/sync/gradle/test

1 file changed

+3
-5
lines changed

bulk-model-sync-gradle-test/src/test/kotlin/org/modelix/model/sync/gradle/test/PushTest.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import org.modelix.model.server.Main
2424
import org.modelix.model.sleep
2525
import org.modelix.model.sync.bulk.asExported
2626
import java.io.File
27-
import kotlin.test.assertEquals
27+
import kotlin.test.assertContentEquals
2828

2929
class PushTest {
3030

@@ -51,9 +51,7 @@ class PushTest {
5151
client.getReplicatedModel(branchRef).start()
5252
}
5353
branch.runRead {
54-
branch.getRootNode().allChildren.forEachIndexed { index, child ->
55-
assertEquals(inputModel.root.children[index], child.asExported())
56-
}
54+
assertContentEquals(inputModel.root.children, branch.getRootNode().allChildren.map { it.asExported() })
5755
}
5856

5957
applyChangesForPullTest(branch)
@@ -71,6 +69,6 @@ class PushTest {
7169
graphNodes[1].name = "Y"
7270
graphNodes[2].name = "Z"
7371
}
74-
sleep(5000) // wait for changes to be sent to server
72+
sleep(5000) // changes are pushed asynchronously to the server. wait for the propagation
7573
}
7674
}

0 commit comments

Comments
 (0)