Skip to content
Browse files

Added versions of read/listkeys that repeat and print to console.

  • Loading branch information...
1 parent a14e55e commit f14e1bffb99f79112c67caa5280684af5b0be762 @jonmeredith jonmeredith committed Sep 26, 2011
Showing with 26 additions and 0 deletions.
  1. +26 −0 systest.erl
View
26 systest.erl
@@ -61,6 +61,19 @@ read(Start, End, Bucket, R) ->
end,
lists:foldl(F, [], lists:seq(Start, End)).
+read(_Start, _End, _Bucket, _R, 0) ->
+ io:format("Done\n");
+read(Start, End, Bucket, R, Iter) ->
+ Diffs = read(Start, End, Bucket, R),
+ case Diffs of
+ [] ->
+ io:format("~p: ok\n", [Iter]);
+ _ ->
+ io:format("~p: DIFFS missing ~p\n", [Iter, length(Diffs)])
+ end,
+ read(Start, End, Bucket, R, Iter - 1).
+
+
listkeys(Size) ->
listkeys(1, Size, <<"systest">>).
@@ -72,3 +85,16 @@ listkeys(Start, End, Bucket) ->
Got2 = ordsets:from_list(Got),
ordsets:subtract(Expect, Got2) ++ ordsets:subtract(Got2, Expect).
+
+listkeys(Start, End, Bucket, 0) ->
+ io:format("Done\n");
+listkeys(Start, End, Bucket, Iter) ->
+ Diffs = listkeys(Start, End, Bucket),
+ case Diffs of
+ [] ->
+ io:format("~p: ok\n", [Iter]);
+ _ ->
+ io:format("~p: DIFFS missing ~p\n", [Iter, length(Diffs)])
+ end,
+ listkeys(Start, End, Bucket, Iter - 1).
+

0 comments on commit f14e1bf

Please sign in to comment.
Something went wrong with that request. Please try again.