995 Commits

Author SHA1 Message Date
antirez
a6561f8e30 PSYNC2: Test (WIP).
This is the PSYNC2 test that helped find issues in the code, and that
still can show a protocol desync from time to time. Work is in progress
in order to find the issue. For now the test is not enabled in "make
test" and must be run manually.
2016-11-28 10:13:24 +01:00
antirez
14c11b2540 Test: WAIT tests added in wait.tcl unit. 2016-11-18 13:10:29 +01:00
antirez
9481b398e9 Test: regression test for #3564 added. 2016-10-31 15:46:58 +01:00
antirez
d64b08bb64 Fix SELECT test, broken cause change in error msg. 2016-10-14 15:48:11 +02:00
antirez
8107b61b0d RDB AOF preamble: test it in the aofrw unit. 2016-08-24 15:39:39 +02:00
antirez
23bdeec122 Multiple GEORADIUS bugs fixed.
By grepping the continuous integration errors log a number of GEORADIUS
tests failures were detected.

Fortunately when a GEORADIUS failure happens, the test suite logs enough
information in order to reproduce the problem: the PRNG seed,
coordinates and radius of the query.

By reproducing the issues, three different bugs were discovered and
fixed in this commit. This commit also improves the already good
reporting of the fuzzer and adds the failure vectors as regression
tests.

The issues found:

1. We need larger squares around the poles in order to cover the area
requested by the user. There were already checks in order to use a
smaller step (larger squares) but the limit set (+/- 67 degrees) is not
enough in certain edge cases, so 66 is used now.

2. Even near the equator, when the search area center is very near the
edge of the square, the north, south, west or ovest square may not be
able to fully cover the specified radius. Now a test is performed at the
edge of the initial guessed search area, and larger squares are used in
case the test fails.

3. Because of rounding errors between Redis and Tcl, sometimes the test
signaled false positives. This is now addressed.

Whenever possible the original code was improved a bit in other ways. A
debugging example stanza was added in order to make the next debugging
session simpler when the next bug is found.
2016-07-27 11:34:25 +02:00
antirez
16534c5f6f Sentinel: new test unit 07 that tests master down conditions. 2016-07-22 16:39:26 +02:00
antirez
d6332b5034 Sentinel: check Slave INFO state more often when disconnected.
During the initial handshake with the master a slave will report to have
a very high disconnection time from its master (since technically it was
disconnected since forever, so the current UNIX time in seconds is
reported).

However when the slave is connected again the Sentinel may re-scan the
INFO output again only after 10 seconds, which is a long time. During
this time Sentinels will consider this instance unable to failover, so
a useless delay is introduced.

Actaully this hardly happened in the practice because when a slave's
master is down, the INFO period for slaves changes to 1 second. However
when a manual failover is attempted immediately after adding slaves
(like in the case of the Sentinel unit test), this problem may happen.

This commit changes the INFO period to 1 second even in the case the
slave's master is not down, but the slave reported to be disconnected
from the master (by publishing, last time we checked, a master
disconnection time field in INFO).

This change is required as a result of an unrelated change in the
replication code that adds a small delay in the master-slave first
synchronization.
2016-07-22 10:51:25 +02:00
antirez
bf51d7ed15 Regression test for issue #3333. 2016-07-06 11:50:20 +02:00
antirez
d403c08878 Fix test for new RDB checksum failure message. 2016-07-04 12:41:35 +02:00
antirez
a0c8276e16 Test: new randomized stress tester for #3343 alike bugs. 2016-06-28 09:42:20 +02:00
antirez
bb0776971f Stress tester WIP. 2016-06-28 09:33:36 +02:00
antirez
224533b454 Regression test for issue #3343 exact min crash sequence.
Note: it was verified that it can crash the test suite without the patch
applied.
2016-06-28 09:27:14 +02:00
antirez
4e95d8c0a1 Test TOUCH and new TTL / TYPE behavior about object access time. 2016-06-15 17:15:51 +02:00
antirez
df28ab3fce Regression test for #3282. 2016-06-15 11:49:49 +02:00
Pierre Chapuis
08a8ae709b make RPUSHX and LPUSHX variadic 2016-06-05 16:50:24 +02:00
antirez
7010fc08c8 Test: run GEO tests by default.
Thanks to @oranagra for noticing it was missing.
2016-05-31 16:43:51 +02:00
antirez
d31703f3a5 Now that SPOP can be called by scripts use BLPOP on 's' flag test. 2016-05-31 16:43:23 +02:00
antirez
3af352d4ba Test for BITFIELD regression #3221. 2016-05-18 14:53:30 +02:00
antirez
97e1c04f9c Scripting test: match new error message. 2016-05-06 09:12:56 +02:00
antirez
c741cae38c Cluster test 12: reshard back just a few slots to speedup the test. 2016-05-05 11:57:49 +02:00
antirez
10381ae169 Quick fix to avoid false positive in replica migration test. 2016-05-05 09:45:31 +02:00
Salvatore Sanfilippo
8f22e65c39 Merge pull request #3191 from oranagra/minor_fix
Minor fixes found during merge and code review
2016-05-04 09:11:36 +02:00
antirez
14bdb0a42c Cluster regression test for #3043.
The test works but is very slow so far, since it involves resharding
1/5 of all the cluster slots from master 0 to the other 4 masters and
back into the original master.
2016-05-02 18:37:37 +02:00
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