Skip to content

Commit

Permalink
Merge 6e8951e into 1d21a49
Browse files Browse the repository at this point in the history
  • Loading branch information
kinow committed Oct 11, 2017
2 parents 1d21a49 + 6e8951e commit 659d9a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/changes/changes.xml
Expand Up @@ -21,6 +21,9 @@
</properties>
<body>
<release version="4.2" date="YYYY-MM-DD" description="New features">
<action issue="COLLECTIONS-661" dev="kinow" type="fix">
Intermittent test failures in Windows for HashSetValuedHashMap
</action>
<action issue="COLLECTIONS-660" dev="kinow" type="fix">
Uncomment test in AbstractMapTest regarding LRUMap equals
</action>
Expand Down
Expand Up @@ -1086,7 +1086,10 @@ public K[] getSampleKeys() {
@Override
@SuppressWarnings("unchecked")
public Collection<V>[] getSampleValues() {
boolean isSetValuedMap = AbstractMultiValuedMapTest.this.getMap() instanceof SetValuedMap;
// Calling getMap() instead of makeObject() would make more sense, but due to concurrency
// issues, this may lead to intermittent issues. See COLLECTIONS-661. A better solution
// would be to re-design the tests, or add a boolean method to the parent.
boolean isSetValuedMap = AbstractMultiValuedMapTest.this.makeObject() instanceof SetValuedMap;
V[] sampleValues = AbstractMultiValuedMapTest.this.getSampleValues();
Collection<V>[] colArr = new Collection[3];
for(int i = 0; i < 3; i++) {
Expand All @@ -1099,7 +1102,9 @@ public Collection<V>[] getSampleValues() {
@Override
@SuppressWarnings("unchecked")
public Collection<V>[] getNewSampleValues() {
boolean isSetValuedMap = AbstractMultiValuedMapTest.this.getMap() instanceof SetValuedMap;
// See comment in getSampleValues() to understand why we are calling makeObject() and not
// getMap(). See COLLECTIONS-661 for more.
boolean isSetValuedMap = AbstractMultiValuedMapTest.this.makeObject() instanceof SetValuedMap;
Object[] sampleValues = { "ein", "ek", "zwei", "duey", "drei", "teen" };
Collection<V>[] colArr = new Collection[3];
for (int i = 0; i < 3; i++) {
Expand Down

0 comments on commit 659d9a5

Please sign in to comment.