ACCUMULO-2541 Set seekSleepTime and not (next)sleepTime in ScannerIT Setting a batchSize of 1 will cause a new ScanSession for each k/v returned. This means that next() will never be called on SlowIterator and thus the intended effect of waiting server side doesn't actually happen.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/04281228 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/04281228 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/04281228 Branch: refs/heads/master Commit: 04281228716d3981d88c4769083c4f2f307343fd Parents: 6430933 Author: Josh Elser <els...@apache.org> Authored: Thu Mar 27 17:19:26 2014 -0700 Committer: Josh Elser <els...@apache.org> Committed: Thu Mar 27 17:19:26 2014 -0700 ---------------------------------------------------------------------- .../java/org/apache/accumulo/test/functional/ScannerIT.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/04281228/test/src/test/java/org/apache/accumulo/test/functional/ScannerIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ScannerIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ScannerIT.java index f2211e5..3fca421 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/ScannerIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ScannerIT.java @@ -60,9 +60,12 @@ public class ScannerIT extends SimpleMacIT { Scanner s = c.createScanner(table, new Authorizations()); IteratorSetting cfg = new IteratorSetting(100, SlowIterator.class); - SlowIterator.setSleepTime(cfg, 100l); + // A batch size of one will end up calling seek() for each element with no calls to next() + SlowIterator.setSeekSleepTime(cfg, 100l); + s.addScanIterator(cfg); - s.setReadaheadThreshold(5); + // Never start readahead + s.setReadaheadThreshold(Long.MAX_VALUE); s.setBatchSize(1); s.setRange(new Range());