Commit Graph

492 Commits

Author SHA1 Message Date
4930d903fc Fix eval usage in tests to conform with eval semantics 2014-04-06 17:20:01 +03:00
352208ff68 Initial HyperLogLog tests. 2014-04-03 22:16:05 +02:00
8b8c1cd4c2 BITPOS fuzzy testing. 2014-02-27 15:27:05 +01:00
b21f4d63de Basic BITPOS tests. 2014-02-27 15:01:45 +01:00
8d95a47408 Added two more BITCOUNT tests stressing misaligned access. 2014-02-27 10:07:29 +01:00
2a7847a3b5 BITCOUNT fuzzy test with random start/end added.
It was verified in practice that this test is able to stress much more
the implementation by introducing errors that were only trivially to
detect with different offsets but impossible to detect starting always
at zero and counting bits the full length of the string.
2014-02-27 10:00:17 +01:00
f2bdf601be Test: regression for issue #1549.
It was verified that reverting the commit that fixes the bug, the test
no longer passes.
2014-02-13 12:26:38 +01:00
5d08413b13 Test: regression for issues #1483. 2014-01-09 11:19:03 +01:00
a2f9947827 Test: stress events flags to/from string conversion. 2014-01-08 17:18:30 +01:00
b1ba58f341 SDIFF iterator misuse bug regression test added.
See commit c00453d for more info about the bug.
2013-12-13 11:37:13 +01:00
6e70c01148 Return proper error on requests with an unbalanced number of quotes. 2013-12-08 12:58:12 +02:00
fcebd9b0f9 Fix false positive in memory efficiency test.
Fixes issue #1298.
2013-11-25 10:21:46 +01:00
bf79c0cda2 Added tests for [SHZ]SCAN with MATCH. 2013-11-05 15:19:44 +01:00
9fba193a59 SSCAN with integer encoded object test improved. 2013-10-31 10:37:27 +01:00
e6bb738b87 Regression test added for [SHZ]SCAN issue #1354. 2013-10-31 09:43:21 +01:00
0b8a0ca4bc Test: added a SCAN test trying to trigger HT resize. 2013-10-30 16:50:25 +01:00
6cb52256c9 Test: added ZSCAN test. 2013-10-30 16:25:53 +01:00
1b960378e8 Test: added HSCAN test. 2013-10-30 16:24:39 +01:00
ddc80e026f Test: added SSCAN test. 2013-10-30 11:58:04 +01:00
5fdb94fd98 SCAN test keys sorting turned into more idiomatic Tcl. 2013-10-30 11:36:12 +01:00
a881827b6e SCAN: tests moved to unit/scan.tcl. 2013-10-30 11:34:01 +01:00
0471b90844 SCAN: Fix test after option renamed from PATTERN to MATCH. 2013-10-25 11:55:28 +02:00
7f490b197f Add SCAN command 2013-10-25 10:49:48 +02:00
e9d97b453e Test: Lua stack leak regression test added. 2013-08-30 08:59:11 +02:00
f79b1cb49e Test: added a memory efficiency test. 2013-08-29 16:23:57 +02:00
ddccd0ed58 Test: regression test for issue #1208. 2013-07-22 23:40:48 +02:00
b02bb47e67 Test: regression test for #1163. 2013-06-19 18:53:07 +02:00
dfc31a1ee8 Test: Extended SET tests. 2013-03-28 16:25:24 +01:00
601cea665d Test: regression test for issue #1026. 2013-03-28 11:46:14 +01:00
1b13adf388 Test: verify that lazy-expire works. 2013-03-28 11:36:49 +01:00
252cf3052d Test: test replication of MULTI/EXEC. 2013-03-27 11:44:50 +01:00
40b692e822 Test: Restore DB back to 9 after testing MULTI/EXEC with DB 5. 2013-03-27 11:30:23 +01:00
797d98e906 Test: obuf-limits test false positive removed.
Fixes #621.
2013-03-25 11:56:34 +01:00
dc24a6b132 Return a specific NOAUTH error if authentication is required. 2013-02-12 16:25:41 +01:00
ac8c89cb20 Test: avoid false positives in CLIENT SETNAME closed connection test. 2013-02-12 13:27:24 +01:00
d2b27f1d96 Tests for keyspace notifications. 2013-01-28 13:15:22 +01:00
2039f1a38a UNSUBSCRIBE and PUNSUBSCRIBE: always provide a reply.
UNSUBSCRIBE and PUNSUBSCRIBE commands are designed to mass-unsubscribe
the client respectively all the channels and patters if called without
arguments.

However when these functions are called without arguments, but there are
no channels or patters we are subscribed to, the old behavior was to
don't reply at all.

This behavior is broken, as every command should always reply.
Also it is possible that we are no longer subscribed to a channels but we
are subscribed to patters or the other way around, and the client should
be notified with the correct number of subscriptions.

Also it is not pretty that sometimes we did not receive a reply at all
in a redis-cli session from these commands, blocking redis-cli trying
to read the reply.

This fixes issue #714.
2013-01-21 19:02:26 +01:00
08d200baeb Slowlog: don't log EXEC but just the executed commands.
The Redis Slow Log always used to log the slow commands executed inside
a MULTI/EXEC block. However also EXEC was logged at the end, which is
perfectly useless.

Now EXEC is no longer logged and a test was added to test this behavior.

This fixes issue #759.
2013-01-19 12:53:21 +01:00
9d09ce3981 Fixed many typos. 2013-01-19 10:59:44 +01:00
ea1f503cfe Tests for CLIENT GETNAME/SETNAME. 2013-01-15 13:34:17 +01:00
a5cc063c17 Test: added regression for issue #872. 2013-01-10 11:10:31 +01:00
c135b856c6 Test: regression for issue #801. 2012-12-02 20:43:11 +01:00
f50e658455 SDIFF is now able to select between two algorithms for speed.
SDIFF used an algorithm that was O(N) where N is the total number
of elements of all the sets involved in the operation.

The algorithm worked like that:

ALGORITHM 1:

1) For the first set, add all the members to an auxiliary set.
2) For all the other sets, remove all the members of the set from the
auxiliary set.

So it is an O(N) algorithm where N is the total number of elements in
all the sets involved in the diff operation.

Cristobal Viedma suggested to modify the algorithm to the following:

ALGORITHM 2:

1) Iterate all the elements of the first set.
2) For every element, check if the element also exists in all the other
remaining sets.
3) Add the element to the auxiliary set only if it does not exist in any
of the other sets.

The complexity of this algorithm on the worst case is O(N*M) where N is
the size of the first set and M the total number of sets involved in the
operation.

However when there are elements in common, with this algorithm we stop
the computation for a given element as long as we find a duplicated
element into another set.

I (antirez) added an additional step to algorithm 2 to make it faster,
that is to sort the set to subtract from the biggest to the
smallest, so that it is more likely to find a duplicate in a larger sets
that are checked before the smaller ones.

WHAT IS BETTER?

None of course, for instance if the first set is much larger than the
other sets the second algorithm does a lot more work compared to the
first algorithm.

Similarly if the first set is much smaller than the other sets, the
original algorithm will less work.

So this commit makes Redis able to guess the number of operations
required by each algorithm, and select the best at runtime according
to the input received.

However, since the second algorithm has better constant times and can do
less work if there are duplicated elements, an advantage is given to the
second algorithm.
2012-11-30 16:36:42 +01:00
395d663d29 SDIFF fuzz test added. 2012-11-30 01:35:34 +01:00
925090f476 Make an EXEC test more latency proof. 2012-11-29 16:12:14 +01:00
95f68f7b0f EVALSHA is now case insensitive.
EVALSHA used to crash if the SHA1 was not lowercase (Issue #783).
Fixed using a case insensitive dictionary type for the sha -> script
map used for replication of scripts.
2012-11-22 15:50:00 +01:00
65606b3bc6 Test: MULTI state is cleared after EXECABORT error. 2012-11-22 10:32:20 +01:00
4977ab79af Test: make sure EXEC fails after previous transaction errors. 2012-11-22 10:32:16 +01:00
9c00f07897 Test: MULTI/EXEC tests moved into multi.tcl. 2012-11-22 10:32:12 +01:00
a779b7e901 Merge branch 'migrate-cache' into unstable 2012-11-14 12:21:23 +01:00