From 14d7d98e7e3c993ac2e0f8b32ccc3789eb7ecc14 Mon Sep 17 00:00:00 2001 From: anantdahiya8 Date: Sat, 5 Nov 2022 02:50:37 -0500 Subject: [PATCH] COLLECTIONS-836: fix flaky test DualHashBidiMapTest (#353) --- .../commons/collections4/bidimap/AbstractBidiMapTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/java/org/apache/commons/collections4/bidimap/AbstractBidiMapTest.java b/src/test/java/org/apache/commons/collections4/bidimap/AbstractBidiMapTest.java index 8a9a0b653..e4b16a8a7 100644 --- a/src/test/java/org/apache/commons/collections4/bidimap/AbstractBidiMapTest.java +++ b/src/test/java/org/apache/commons/collections4/bidimap/AbstractBidiMapTest.java @@ -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 extends AbstractIterableMapTest< @Test public void testBidiKeySetValuesOrder() { + // Skip if collection is unordered + Assumptions.assumeFalse((getIterationBehaviour() & AbstractCollectionTest.UNORDERED) != 0); resetFull(); final Iterator keys = map.keySet().iterator(); final Iterator values = map.values().iterator();