Skip to content

Commit

Permalink
Rework test fixtures
Browse files Browse the repository at this point in the history
Next, grow the amount of data tested to find bugs in the tests with
non-repeatable map ordering
  • Loading branch information
garydgregory committed Mar 31, 2024
1 parent 8cae451 commit 31b4116
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1257,10 +1257,18 @@ public void testRemoveViaValuesRemove() {
assumeTrue(isRemoveSupported());
final MultiValuedMap<K, V> map = makeFullMap();
final Collection<V> values = map.values();
values.remove("v0_0");
values.remove("v0_1");
assertFalse(map.containsKey("k0"));
assertEquals(4, map.size());
final int maxK = getSampleKeySize();
final int maxV = getSampleCountPerKey();
int expectedSize = map.size();
for (int k = 0; k < maxK; k++) {
for (int v = 0; v < maxV; v++) {
values.remove(makeValue(k, v));
}
assertFalse(map.containsKey(makeKey(k)));
expectedSize -= maxV;
assertEquals(expectedSize, map.size());
}
assertEquals(0, map.size());
}

@Test
Expand Down

0 comments on commit 31b4116

Please sign in to comment.