COLLECTIONS-836: fix flaky test DualHashBidiMapTest (#353)

This commit is contained in:
anantdahiya8 2022-11-05 02:50:37 -05:00 committed by GitHub
parent 9582007123
commit 14d7d98e7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -27,8 +27,10 @@ import java.util.Set;
import org.apache.commons.collections4.BidiMap;
import org.apache.commons.collections4.BulkTest;
import org.apache.commons.collections4.MapIterator;
import org.apache.commons.collections4.collection.AbstractCollectionTest;
import org.apache.commons.collections4.iterators.AbstractMapIteratorTest;
import org.apache.commons.collections4.map.AbstractIterableMapTest;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.Test;
/**
@ -265,6 +267,8 @@ public abstract class AbstractBidiMapTest<K, V> extends AbstractIterableMapTest<
@Test
public void testBidiKeySetValuesOrder() {
// Skip if collection is unordered
Assumptions.assumeFalse((getIterationBehaviour() & AbstractCollectionTest.UNORDERED) != 0);
resetFull();
final Iterator<K> keys = map.keySet().iterator();
final Iterator<V> values = map.values().iterator();