reverbrain / eblob

Eblob is an append-only low-level IO library, which saves data in blob files. Created as low-level backend for elliptics
GNU Lesser General Public License v3.0
104 stars 29 forks source link

Added iteration tests to eblob stress. #95

Closed shaitan closed 9 years ago

shaitan commented 9 years ago

At the end of eblob stress it will runs 3 iterations:

Out of range iteration

Runs iteration on ranges: [00..0, minimal key) and (maximal key, FF..F]. These ranges do not include any of existent key. Checks that iteration does not find any key.

Part of range iteration

Creates 2 ranges: [00..0, 40..0] and [C0..0, F0..0], that should include some part of existent key. Find such keys and checks that iteration finds all these key.

Full range iteration

Runs iteration on one range: [00..0, FF..F] and checks that all existent keys have been found by iteration.

These tests found that iteration of unsorted indexes returns keys from out of ranges - I've added checking ranges even if index is unsorted and used bsearch for checking if a key is from ranges.