I think the tests can be improved to fail rather than entering an endless loop this way:
do {
TestingUtil.sleepRandom(1000);
entry = store.load(key);
} while (!entry.getValue().equals(value + (number-1)));
New version, allows a timeout of aprox 60 seconds:
boolean success = false;
for (int i = 0; i < 120; i++) {
TestingUtil.sleepRandom(1000);
entry = store.load(key);
success = entry.getValue().equals(value + (number-1));
if (success) break;
}
assert success;
I know TestNG supports timeouts at test method level, never used it though...