1121 Commits

Author SHA1 Message Date
Oran Agra
7496636280 various cleanups and minor fixes 2016-04-25 16:49:57 +03:00
Damian Janowski
217f52ffe6 Fix ZINCRBY return value. 2016-04-18 00:35:54 -03:00
antirez
a37d517fc2 BITFIELD: overflow wrap behavior fuzz tester. 2016-03-02 17:22:42 +01:00
antirez
d9cd234b39 BITFIELD basic unit tests. 2016-03-02 16:31:02 +01:00
antirez
33b1f57f32 BITFIELD: overflow fuzzy testing. 2016-03-02 15:16:17 +01:00
antirez
fa4c5200a3 Fix typo in bitops.tcl comment. 2016-03-02 15:14:59 +01:00
James Rouzier
9ebde01b73 If the unit of a timeout is seconds treat it a float 2016-02-23 12:05:29 -05:00
antirez
3b3a959c85 GEOADD STORE/STOREDIST tests. 2016-02-18 14:42:42 +01:00
antirez
1f0f75e71f Cluster: resharding test provides more state when failing.
Now elements added to lists are incremental numbers in order to
understand, when inconsistencies are found, what is the order in which
the elements were added. Also the error now provides both the expected
and found value.
2016-02-17 12:30:00 +01:00
antirez
e9cd997869 Fix to Cluster test to support @busport format. 2016-02-02 11:03:53 +01:00
antirez
6411eadf20 Merge branch 'unstable' of github.com:/antirez/redis into unstable 2016-01-15 16:51:18 +01:00
antirez
609762bbe1 Test: Handle LOADING in restart_instance. 2016-01-15 16:50:35 +01:00
Salvatore Sanfilippo
80d79c718e Merge pull request #2726 from seppo0010/patch-2
Fix race condition in unit/introspection
2016-01-15 16:24:06 +01:00
antirez
e033f08b4a Detect and show crashes on Sentinel/Cluster tests. 2016-01-15 10:20:35 +01:00
antirez
9361687f30 Scripting: handle trailing comments.
This fix, provided by Paul Kulchenko (@pkulchenko), allows the Lua
scripting engine to evaluate statements with a trailing comment like the
following one:

    EVAL "print() --comment" 0

Lua can't parse the above if the string does not end with a newline, so
now a final newline is always added automatically. This does not change
the SHA1 of scripts since the SHA1 is computed on the body we pass to
EVAL, without the other code we add to register the function.

Close #2951.
2016-01-08 15:44:21 +01:00
antirez
329b84da93 Cluster test: do leaks detection with OSX leaks utility. 2016-01-02 13:14:23 +01:00
antirez
889ef9d003 Cluster/Sentinel test: report ability to run via valgrind. 2015-12-29 15:27:26 +01:00
antirez
100cc239ee Cluster: verify slaves consistency after resharding. 2015-12-18 11:33:49 +01:00
antirez
f7d2bb3ceb Cluster: resharding test now checks AOF consistency.
It's a key invariant that when AOF is enabled, after the cluster
reshards, a crash-recovery event causes all the keys to be still fine
with the expected logical content. Now this is part of unit 04.
2015-12-17 17:52:11 +01:00
antirez
b5967cf2ab MIGRATE: test more corner cases. 2015-12-11 14:27:08 +01:00
antirez
c72ee4c632 Test: pipelined MIGRATE tests added. 2015-12-11 13:41:58 +01:00
antirez
c112520b8a Cluster: more reliable migration tests.
The old version was modeled with two failovers, however after the first
it is possible that another slave will migrate to the new master, since
for some time the new master is not backed by any slave. Probably there
should be some pause after a failover, before the migration. Anyway the
test is simpler in this way, and depends less on timing.
2015-12-10 12:58:28 +01:00
antirez
a5e2a4e3fb Cluster: more reliable replicas migration test. 2015-12-10 09:11:02 +01:00
antirez
74f83badbf Test HINCRBYFLOAT rounding only in x86_64 and when valgrind is not in use.
64 bit double math is not enough to make the test passing, and rounding
to 1.2999999 instead of 1.23 is not an error in the implementation.
Valgrind and sometimes other archs are not able to work with 80 bit
doubles.
2015-11-28 09:28:37 +01:00
antirez
82c68fa048 Add regression test for HINCRBYFLOAT formatting change.
This test was kindly provided by Jan-Erik Rediger (@badboy here on
Github) that discovered the issue.

See issue #2846.
2015-11-04 17:02:34 +01:00
antirez
04278a276a Test: improve PFCOUNT with multiple keys testing.
An user raised a question about a given behavior of PFCOUNT. Added a
test to show the behavior (union) is correct when most of the items are
in common.
2015-11-03 19:03:17 +01:00
antirez
dbebe3b4cd Scripting: commands replication tests. 2015-10-30 12:06:09 +01:00
antirez
65ca281273 Scripting: execute tests with command replication as well. 2015-10-30 12:06:09 +01:00
antirez
eca9dc7b3d Scripting: test Redis provided Lua functions error reporting. 2015-10-30 12:06:09 +01:00
antirez
70cd161879 Regression test for issue #2813. 2015-10-15 11:23:15 +02:00
antirez
6a3e201234 Test: basic lazyfree unit test. 2015-10-09 09:47:17 +02:00
antirez
c3dbfc8825 Test: fix attach_to_replication_stream to handle newlines. 2015-10-07 22:32:24 +02:00
antirez
dc5b467b17 Regression test for GEORADIUS COUNT arity check. 2015-10-06 09:27:29 +02:00
antirez
d8afd9bc95 Test: stack_logging var should be initialized to 0. 2015-10-01 13:02:25 +02:00
antirez
cdfd6a2607 Test: support for stack logging for OSX malloc/leaks. 2015-10-01 13:02:25 +02:00
antirez
2a014229f0 Test: fix false positive in HSTRLEN test.
HINCRBY* tests later used the value "tmp" that was sometimes generated
by the random key generation function. The result was ovewriting what
Tcl expected to be inside Redis with another value, causing the next
HSTRLEN test to fail.
2015-09-15 09:37:30 +02:00
antirez
3ba00aae8e GEORADIUS: Don't report duplicates when radius is huge.
Georadius works by computing the center + neighbors squares covering all
the area of the specified position and radius. Then a distance filter is
used to remove elements which are actually outside the range.

When a huge radius is used, like 5000 km or more, adjacent neighbors may
collide and be the same, leading to the reporting of the same element
multiple times. This only happens in the edge case of huge radius but is
not ideal.

A robust but slow solution would involve qsorting the range to remove
all the duplicates. However since the collisions are only in adjacent
boxes, for the way they are ordered in the code, it is much faster to
just check if the current box is the same as the previous one processed.

This commit adds a regression test for the bug.

Fixes #2767.
2015-09-14 23:10:50 +02:00
antirez
f2a7d445c6 Test: MOVE expire test improved.
Related to #2765.
2015-09-14 12:35:55 +02:00
antirez
13dff381b3 MOVE now can move TTL metadata as well.
MOVE was not able to move the TTL: when a key was moved into a different
database number, it became persistent like if PERSIST was used.

In some incredible way (I guess almost nobody uses Redis MOVE) this bug
remained unnoticed inside Redis internals for many years.
Finally Andy Grunwald discovered it and opened an issue.

This commit fixes the bug and adds a regression test.

Close #2765.
2015-09-14 12:30:00 +02:00
antirez
e8bee5c796 Test: print info on HSTRLEN test failure.
This additional info may provide more clues about the test randomly
failing from time to time. Probably the failure is due to some previous
test that overwrites the logical content in the Tcl variable, but this
will make the problem more obvious.
2015-09-07 11:14:52 +02:00
Sebastian Waisbrot
7be8687677 Fix race condition in unit/introspection
Make sure monitor is attached in one connection before issuing commands to be monitored in another one
2015-08-11 22:56:17 -07:00
antirez
dc69b7ab01 Fix RDB encoding test for new csvdump format. 2015-08-05 14:05:43 +02:00
antirez
0aa35539c6 Test: csvdump now scans all DBs. 2015-08-05 12:27:15 +02:00
antirez
2ef570a4c3 PSYNC test: also test the vanilla SYNC. 2015-08-05 09:18:54 +02:00
antirez
05cf0f0948 Test PSYNC with diskless replication.
Thanks to Oran Agra from Redis Labs for providing this patch.
2015-08-04 13:14:25 +02:00
antirez
a2482feaa5 GEOENCODE / GEODECODE commands removed.
Rationale:

1. The commands look like internals exposed without a real strong use
case.
2. Whatever there is an use case, the client would implement the
commands client side instead of paying RTT just to use a simple to
reimplement library.
3. They add complexity to an otherwise quite straightforward API.

So for now KILLED ;-)
2015-07-09 17:42:59 +02:00
antirez
f7922b6db7 Geo: GEODIST and tests. 2015-06-29 12:44:34 +02:00
antirez
ac7f59fac5 Geo: GEOPOS command and tests. 2015-06-29 10:47:07 +02:00
antirez
665099cb02 Geo: GEORADIUS COUNT tests. 2015-06-29 09:52:23 +02:00
antirez
e1db8275e9 Geo: GEOENCODE test fixed for new return value. 2015-06-29 09:46:58 +02:00