Skip to content

Commit 8ae66db

Browse files
committed
add tests for getMultipleKey reported actualVersions
1 parent 27e4745 commit 8ae66db

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/scala/com/scalableminds/fossildb/FossilDBSuite.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ class FossilDBSuite extends FlatSpec with BeforeAndAfterEach with TestHelpers {
206206
assert(reply.values.length == 2)
207207
assert(reply.values.contains(testData2))
208208
assert(reply.values.contains(testData3))
209+
assert(reply.actualVersions.length == 2)
210+
assert(reply.actualVersions.contains(0))
209211
}
210212

211213
it should "return keys of matching version (sorted alphabetically)" in {
@@ -236,6 +238,7 @@ class FossilDBSuite extends FlatSpec with BeforeAndAfterEach with TestHelpers {
236238
val reply = client.getMultipleKeys(GetMultipleKeysRequest(collectionA, aKey, Some("aK"), Some(1)))
237239
assert(reply.keys.length == 1)
238240
assert(reply.values.contains(testData2))
241+
assert(reply.actualVersions.contains(1))
239242
}
240243

241244
it should "with limit return only the first n keys of matching version " in {
@@ -251,6 +254,7 @@ class FossilDBSuite extends FlatSpec with BeforeAndAfterEach with TestHelpers {
251254
val reply = client.getMultipleKeys(GetMultipleKeysRequest(collectionA, aKey, None, Some(1), Some(2)))
252255
assert(reply.keys.length == 2)
253256
assert(reply.values.contains(testData2))
257+
assert(reply.actualVersions.contains(1))
254258
}
255259

256260
"Backup" should "create non-empty backup directory" in {

0 commit comments

Comments
 (0)