Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit f5feadf

Browse files
committed
Add test for iterating over an empty map
1 parent 273b842 commit f5feadf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

unsafe/src/test/java/org/apache/spark/unsafe/map/AbstractBytesToBytesMapSuite.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ public void emptyMap() {
103103
final int keyLengthInBytes = keyLengthInWords * 8;
104104
final byte[] key = getRandomByteArray(keyLengthInWords);
105105
Assert.assertFalse(map.lookup(key, BYTE_ARRAY_OFFSET, keyLengthInBytes).isDefined());
106+
Assert.assertFalse(map.iterator().hasNext());
106107
} finally {
107108
map.free();
108109
}

0 commit comments

Comments
 (0)