HCOLL-251 Make the tests more stable.

This commit is contained in:
Peter Lawrey
2014-12-27 14:53:26 +00:00
parent b6ec1598e8
commit 393be94238
4 changed files with 192 additions and 60 deletions
@@ -214,7 +214,7 @@ class IntIntMultiMap implements MultiMap {
@Override
public long nextPos(SearchState searchState) {
long pos = searchState.searchPos;
while (true) {
for(long count = capacity; count > 0; count--) {
long entry = bytes.readLong(pos);
if (entry == UNSET_ENTRY) {
searchState.searchPos = pos;
@@ -226,6 +226,7 @@ class IntIntMultiMap implements MultiMap {
return value(entry);
}
}
throw new IllegalStateException();
}
@Override
@@ -211,7 +211,7 @@ class ShortShortMultiMap implements MultiMap {
@Override
public long nextPos(SearchState searchState) {
long pos = searchState.searchPos;
while (true) {
for(int count = capacity; count > 0; count--) {
int entry = bytes.readInt(pos);
if (entry == UNSET_ENTRY) {
searchState.searchPos = pos;
@@ -223,6 +223,7 @@ class ShortShortMultiMap implements MultiMap {
return value(entry);
}
}
throw new IllegalStateException();
}
@Override