Skip to content

Commit a5c1c4d

Browse files
Test BoxStore.validate(...) with limit.
1 parent e1950ce commit a5c1c4d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/objectbox-java-test/src/test/java/io/objectbox/BoxStoreTest.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,15 @@ private Callable<String> createTestCallable(final int[] countHolder) {
217217

218218
@Test
219219
public void validate() {
220-
putTestEntities(10);
220+
putTestEntities(100);
221+
222+
// No limit.
221223
long validated = store.validate(0, true);
224+
assertEquals(validated, 7);
225+
226+
// With limit.
227+
validated = store.validate(1, true);
228+
// 2 because the first page doesn't contain any actual data?
222229
assertEquals(validated, 2);
223230
}
224231
}

0 commit comments

Comments
 (0)