Skip to content

Commit

Permalink
test: update test for #678 (#769)
Browse files Browse the repository at this point in the history
  • Loading branch information
BFergerson committed Oct 23, 2022
1 parent 34f4aec commit f20172f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,15 @@ class LargeMapLiveBreakpointTest : LiveInstrumentIntegrationTest() {
largeMapVariable.liveClazz
)

val mapValues = largeMapVariable.value as JsonArray
assertEquals(101, mapValues.size())
val mapValues = largeMapVariable.value as JsonObject
assertEquals(105, mapValues.size())
for (index in 0..99) {
val value = mapValues.getJsonObject(index)
assertEquals(index.toString(), value.getString("name"))

//todo: SmallMapLiveBreakpointTest doesn't create child LiveVariables
val actualValue = value.getJsonArray("value").first() as JsonObject
assertEquals(index.toString(), actualValue.getString("value"))
assertEquals(index.toString(), mapValues.getString(index.toString()))
}
val lastValue = (mapValues.last() as JsonObject).getJsonObject("value")
assertEquals("MAX_COLLECTION_SIZE_EXCEEDED", lastValue.getString("@skip"))
assertEquals(100_000, lastValue.getInteger("@skip[size]"))
assertEquals(100, lastValue.getInteger("@skip[max]"))
assertEquals("MAX_COLLECTION_SIZE_EXCEEDED", mapValues.getString("@skip"))
assertEquals(100_000, mapValues.getInteger("@skip[size]"))
assertEquals(100, mapValues.getInteger("@skip[max]"))
assertNotNull(mapValues.getString("@id"))
}

//test passed
Expand Down

0 comments on commit f20172f

Please sign in to comment.