Merge branch 'pr-194'

This closes #194
This commit is contained in:
Bruno P. Kinoshita 2020-11-10 12:06:58 +13:00
commit 28f5832fa2
2 changed files with 11 additions and 2 deletions

View File

@ -21,6 +21,9 @@
</properties> </properties>
<body> <body>
<release version="4.5" date="2020-MM-DD" description="Maintenance release."> <release version="4.5" date="2020-MM-DD" description="Maintenance release.">
<action issue="COLLECTIONS-771" dev="kinow" type="fix" due-to="Xin Tong">
Fix flaky AbstractMultiValuedMapTest#testToString.
</action>
<action issue="COLLECTIONS-769" dev="kinow" type="fix" due-to="Xin (Cynthia) Tong"> <action issue="COLLECTIONS-769" dev="kinow" type="fix" due-to="Xin (Cynthia) Tong">
Fix flaky UnmodifiableMultiValuedMapTest. Fix flaky UnmodifiableMultiValuedMapTest.
</action> </action>

View File

@ -675,7 +675,10 @@ public abstract class AbstractMultiValuedMapTest<K, V> extends AbstractObjectTes
map.put((K) "B", (V) "U"); map.put((K) "B", (V) "U");
map.put((K) "B", (V) "V"); map.put((K) "B", (V) "V");
map.put((K) "B", (V) "W"); map.put((K) "B", (V) "W");
assertEquals("{A=[X, Y, Z], B=[U, V, W]}", map.toString()); assertTrue(
"{A=[X, Y, Z], B=[U, V, W]}".equals(map.toString()) ||
"{B=[U, V, W], A=[X, Y, Z]}".equals(map.toString())
);
try { try {
final MultiValuedMap<K, V> originalNull = null; final MultiValuedMap<K, V> originalNull = null;
@ -684,7 +687,10 @@ public abstract class AbstractMultiValuedMapTest<K, V> extends AbstractObjectTes
} catch (final NullPointerException npe) { } catch (final NullPointerException npe) {
// expected // expected
} }
assertEquals("{A=[X, Y, Z], B=[U, V, W]}", map.toString()); assertTrue(
"{A=[X, Y, Z], B=[U, V, W]}".equals(map.toString()) ||
"{B=[U, V, W], A=[X, Y, Z]}".equals(map.toString())
);
map.remove("A"); map.remove("A");
map.remove("B"); map.remove("B");