Skip to content

Commit

Permalink
HyperLogLog regression test for issue redis#1762.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed May 19, 2014
1 parent 04d901a commit a9e62ab
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/unit/hyperloglog.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,15 @@ start_server {tags {"hll"}} {
r pfadd hll 1 2 3
llength [r pfdebug getreg hll]
} {16384}

test {PFADD / PFCOUNT cache invalidation works} {
r del hll
r pfadd hll a b c
r pfcount hll
assert {[r getrange hll 15 15] eq "\x00"}
r pfadd hll a b c
assert {[r getrange hll 15 15] eq "\x00"}
r pfadd hll 1 2 3
assert {[r getrange hll 15 15] eq "\x80"}
}
}

0 comments on commit a9e62ab

Please sign in to comment.