290 Commits

Author SHA1 Message Date
antirez
4aa6b6e9b8 BITPOS fuzzy testing. 2014-02-27 15:27:05 +01:00
antirez
0348a8c1f8 Basic BITPOS tests. 2014-02-27 15:01:45 +01:00
antirez
411d930529 Added two more BITCOUNT tests stressing misaligned access. 2014-02-27 10:07:29 +01:00
antirez
ef3d34c345 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
antirez
c0e261e37c 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
antirez
e9786a3255 Test: regression for issues #1483. 2014-01-09 11:19:03 +01:00
antirez
088a617c61 Test: stress events flags to/from string conversion. 2014-01-08 17:18:30 +01:00
antirez
f71de5ab4e SDIFF iterator misuse bug regression test added.
See commit 69a3303 for more info about the bug.
2013-12-13 11:37:13 +01:00
Yossi Gottlieb
834a5f530d Return proper error on requests with an unbalanced number of quotes. 2013-12-08 12:58:12 +02:00
antirez
8bc3e626a5 Fix false positive in memory efficiency test.
Fixes issue #1298.
2013-11-25 10:21:46 +01:00
antirez
7dfcfe47b6 Added tests for [SHZ]SCAN with MATCH. 2013-11-05 15:19:44 +01:00
antirez
adcc1fc04d SSCAN with integer encoded object test improved. 2013-10-31 10:37:27 +01:00
antirez
4f3d9c0595 Regression test added for [SHZ]SCAN issue #1354. 2013-10-31 09:43:21 +01:00
antirez
996bffbfb6 Test: added a SCAN test trying to trigger HT resize. 2013-10-30 16:50:25 +01:00
antirez
cde7c072ba Test: added ZSCAN test. 2013-10-30 16:25:53 +01:00
antirez
82dcd85503 Test: added HSCAN test. 2013-10-30 16:24:39 +01:00
antirez
35250fa9df Test: added SSCAN test. 2013-10-30 11:58:04 +01:00
antirez
a23bf27718 SCAN test keys sorting turned into more idiomatic Tcl. 2013-10-30 11:36:12 +01:00
antirez
d1bdb17b42 SCAN: tests moved to unit/scan.tcl. 2013-10-30 11:34:01 +01:00
antirez
b18ac5f574 SCAN: Fix test after option renamed from PATTERN to MATCH. 2013-10-25 11:55:28 +02:00
Pieter Noordhuis
956c0ed927 Add SCAN command 2013-10-25 10:49:48 +02:00
antirez
ebe91a49c9 Test: Lua stack leak regression test added. 2013-08-30 08:59:11 +02:00
antirez
b3277bab4b Test: added a memory efficiency test. 2013-08-29 16:23:57 +02:00
antirez
995cb581a9 Test: regression test for issue #1208. 2013-07-22 23:40:48 +02:00
antirez
5f770dcc2f Test: regression test for #1163. 2013-06-19 18:53:07 +02:00
antirez
bd771b6c45 Test: Extended SET tests. 2013-03-28 16:25:24 +01:00
antirez
915d1834af Test: regression test for issue #1026. 2013-03-28 11:46:14 +01:00
antirez
9f7e9793ce Test: verify that lazy-expire works. 2013-03-28 11:36:49 +01:00
antirez
e0e1b3a7cf Test: test replication of MULTI/EXEC. 2013-03-27 11:44:50 +01:00
antirez
b163099b47 Test: Restore DB back to 9 after testing MULTI/EXEC with DB 5. 2013-03-27 11:30:23 +01:00
antirez
c4db57ceaf Test: obuf-limits test false positive removed.
Fixes #621.
2013-03-25 11:56:34 +01:00
antirez
cb6ff7f5d1 Return a specific NOAUTH error if authentication is required. 2013-02-12 16:25:41 +01:00
antirez
3f59d66ff0 Test: avoid false positives in CLIENT SETNAME closed connection test. 2013-02-12 13:27:24 +01:00
antirez
1e2f99fce1 Tests for keyspace notifications. 2013-01-28 13:15:22 +01:00
antirez
fb38b9c17f 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
antirez
31615e9ecf 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
guiquanz
df7a5b7157 Fixed many typos. 2013-01-19 10:59:44 +01:00
antirez
eb113b97f9 Tests for CLIENT GETNAME/SETNAME. 2013-01-15 13:34:17 +01:00
antirez
ce6498f2e6 Test: added regression for issue #872. 2013-01-10 11:10:31 +01:00
antirez
e9f1288faf Test: regression for issue #801. 2012-12-02 20:43:11 +01:00
antirez
68e2d2ce07 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
antirez
f76b95e713 SDIFF fuzz test added. 2012-11-30 01:35:34 +01:00
antirez
3284fca0ae Make an EXEC test more latency proof. 2012-11-29 16:12:14 +01:00
antirez
ed54464034 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
antirez
7d7b9bada1 Test: MULTI state is cleared after EXECABORT error. 2012-11-22 10:32:20 +01:00
antirez
1495568cd8 Test: make sure EXEC fails after previous transaction errors. 2012-11-22 10:32:16 +01:00
antirez
5ba2c439b0 Test: MULTI/EXEC tests moved into multi.tcl. 2012-11-22 10:32:12 +01:00
antirez
d9b02a38e6 Merge branch 'migrate-cache' into unstable 2012-11-14 12:21:23 +01:00
antirez
db845c2818 Test: more MIGRATE tests. 2012-11-14 12:12:52 +01:00
antirez
280fce1099 Test: check if MIGRATE is caching connections. 2012-11-14 10:58:34 +01:00