109 Commits

Author SHA1 Message Date
Matt Stancliff
e240d16cc9 Add --track-origins=yes to valgrind 2015-01-21 15:48:19 +01:00
antirez
72640fe5fc Cluster test: also write from Lua script in resharding test. 2015-01-09 11:23:22 +01:00
Matt Stancliff
e24ef16446 Add quicklist implementation
This replaces individual ziplist vs. linkedlist representations
for Redis list operations.

Big thanks for all the reviews and feedback from everybody in
https://github.com/antirez/redis/pull/2143
2015-01-02 11:16:08 -05:00
antirez
e346d72200 Test: wait for actual startup in start_server.
start_server now uses return value from Tcl exec to get the server pid,
however this introduces errors that depend from timing: a lot of the
testing code base assumed the server to be actually up and running when
server_start returns.

So the old code that waits to see the pid in the log file was restored.
2014-11-28 11:49:26 +01:00
antirez
820d9dd5cb Test: try to cleanup still running Redis instances on exit.
It's hard to run the Redis test continuously if it leaks processes on
exceptions / errors.
2014-11-28 11:38:17 +01:00
Matt Stancliff
5fab7e5bf2 Remove trailing spaces from tests 2014-09-29 06:49:08 -04:00
Matt Stancliff
a5042b6c9d Fix spelling in some test cases 2014-09-29 06:49:08 -04:00
Mariano Pérez Rodríguez
144922a63e Stop tests from leaving a black background
Uses ANSI "default background" color code after closing tests
so any non-black terminals don't remain polluted.

Fixes #1649
Closes #1912
2014-08-25 10:14:03 +02:00
antirez
383536119d Test: AOF rewrite during write load. 2014-07-10 11:25:12 +02:00
antirez
e2078f8001 Test: find_available_port: check that cluster port is free as well.
The function will only return ports that have also port+10000 free, so
that Redis Cluster instances can be executed at the returned port.
2014-06-30 12:08:24 +02:00
antirez
49e28db0df Test: Tcl client initial support for automatic reconnection. 2014-06-18 15:52:14 +02:00
antirez
a3e0573ee8 Test: tcl client, unset deferred var on close. 2014-06-18 15:07:08 +02:00
Matt Stancliff
f642944040 Fix test framework to detect proper server PID
Previously the PID format was:
[PID] Timestamp

But it recently changed to:
PID:X Timestamp

The tcl testing framework was grabbing the PID from \[\d+\], but
that's not valid anymore.

Now we grab the pid from "PID: <PID>" in the part of Redis startup
output to the right of the ASCII logo.
2014-05-23 13:54:29 -04:00
antirez
f866ae1e91 cluster.tcl: fix redis links leak in refresh_nodes_map. 2014-05-14 09:10:03 +02:00
antirez
43c3cb9a57 cluster.tcl: saner error handling.
Better handling of connection errors in order to update the table and
recovery, populate the startup nodes table after fetching the list of
nodes.

More work to do about it, it is still not as reliable as
redis-rb-cluster implementation which is the minimal reference
implementation for Redis Cluster clients.
2014-05-14 00:15:52 +02:00
antirez
3d4c02a555 redis.tcl: return I/O error message when peer closes connection. 2014-05-14 00:14:35 +02:00
antirez
8a72258fe9 Test: handle new osx 'leaks' error.
Sometimes the process is still there but no longer in a state that can
be checked (after being killed). This used to happen after a call to
SHUTDOWN NOSAVE in the scripting unit, causing a false positive.
2014-05-07 16:12:32 +02:00
antirez
a2e66ad128 Cluster: Tcl cluster client: handle MOVED/ASK. 2014-05-02 15:35:08 +02:00
antirez
6bfd9d131d Cluster: Tcl cluster client: slots-nodes map and close method.
Now the client is able to actually run commands in a Redis Cluster
assuming the slots->nodes map is stable.
2014-05-02 10:56:02 +02:00
antirez
b865ad41c8 Cluster: Tcl cluster client: build nodes representation. 2014-05-02 10:19:28 +02:00
antirez
bbaddc42ae Cluster: Tcl cluster client: get nodes description. 2014-05-02 09:55:27 +02:00
antirez
03f3698b59 Cluster: Tcl cluster client key -> hashslot. 2014-04-30 18:55:28 +02:00
antirez
99eb3ba709 Cluster test: Tcl cluster library initial skeleton. 2014-04-30 15:47:19 +02:00
antirez
947e9d4d98 Test: do not complain when "leaks" can't run because process died. 2014-03-25 09:33:37 +01:00
antirez
6f02cfaeac Sentinel test: framework improved and conf-update unit added.
It is now possible to kill and restart sentinel or redis instances for
more real-world testing.

The 01 unit tests the capability of Sentinel to update the configuration
of Sentinels rejoining the cluster, however the test is pretty trivial
and more tests should be added.
2014-02-22 17:27:49 +01:00
antirez
e3c7c1ebd5 Test: colorstr moved to util.tcl. 2014-02-17 17:36:50 +01:00
antirez
5917f2c5c5 Test: code to test server availability refactored.
Some inline test moved into server_is_up procedure.
Also find_available_port was moved into util since it is going
to be used for the Sentinel test as well.
2014-02-17 16:44:57 +01:00
antirez
31f34595c6 Test: randomInt() behavior commented. 2013-06-25 15:32:37 +02:00
antirez
89ec3e8b22 Tests added for min-slaves feature. 2013-05-30 18:54:28 +02:00
antirez
cb6ff7f5d1 Return a specific NOAUTH error if authentication is required. 2013-02-12 16:25:41 +01:00
antirez
1272161bdd Test: fixed osx "leaks" support in test.
Due to changes in recent releases of osx leaks utility, the osx leak
detection no longer worked. Now it is fixed in a way that should be
backward compatible.
2012-12-03 12:06:38 +01:00
YAMAMOTO Takashi
1be0eddeff fix a typo in a comment 2012-10-24 17:47:56 +09:00
antirez
c1be7c2610 New test: hash ziplist -> hashtable encoding conversion.
A new stress test was added to stress test the code converting a ziplist
into an hash table.

In this commit also randomValue helper function was modified to also
return negative values.
2012-06-11 15:19:46 +02:00
antirez
7f255aac59 EVAL replication test: less false positives.
wait_for_condition is now used instead of the usual "after 1000" (that
is the way to sleep in Tcl). This should avoid to find the replica in
a state where it is loading the RDB in memory, returning -LOADING error.

This test used to fail when running the test over valgrind, due to the
added latencies.
2012-06-02 23:29:57 +02:00
antirez
f2ca912f74 Tests modified to account for INFO fields renaming.
Commit 2f22d57a5219aaabe088cc4e64624d3d3fccf760 modified the name of a
few INFO fields. This commit changes the Redis test to account for this
changes.
2012-05-25 15:20:59 +02:00
antirez
ccc9234552 Redis test: include bug report on crash.
Due to a change in the format of the bug report in case of crash of
failed assertion the test suite was no longer able to properly log it.
Instead just a protocol error was logged by the Redis TCL client that
provided no clue about the actual problem.

This commit resolves the issue by logging everything from the first line
of the log including the string REDIS BUG REPORT, till the end of the
file.
2012-05-22 13:13:24 +02:00
antirez
53e898d3f1 Redis test: More reliable BRPOPLPUSH replication test.
Now it uses the new wait_for_condition testing primitive.
Also wait_for_condition implementation was fixed in this commit to properly
escape the expr command and its argument.
2012-04-26 11:25:13 +02:00
antirez
d3d7542a86 Redis test: scripting EVALSHA replication test more reliable.
A new primitive wait_for_condition was introduced in the scripting
engine that makes waiting for events simpler, so that it is simpler to
write tests that are more resistant to timing issues.
2012-04-26 11:16:52 +02:00
Michael Schlenker
00ed1334f7 Replace unnecessary calls to echo and cat
Tcl's exec can send data to stdout itself, no need to call cat/echo for
that usually.
2012-04-17 22:20:54 +02:00
antirez
52dff91e8f redis.tcl: no longer leave unread replies if an error happens during a MULTI/EXEC block. 2012-04-06 23:52:28 +02:00
Premysl Hruby
f9bbabc150 in kill_server send the signal once, then wait for up to 5sec before sending lethal SIGKILL 2012-04-03 14:20:52 +02:00
antirez
1d3d7fcbfd Redis test: regexp to check if valgrind reported errors modified. Now we no longer look at the total count because this includes "possibly lost" bytes that are not interesting for Redis (tons of false positives because of how sds.c works). 2012-03-28 10:55:17 +02:00
antirez
1aa0869998 Merge remote-tracking branch 'origin/unstable' into unstable 2012-03-24 12:07:58 +01:00
antirez
6023480646 When running the test in valgrind mode, pass the right flags to show memory leaks stack traces but only including the "definitely lost" items. 2012-03-24 12:07:14 +01:00
antirez
3cd475b254 DEBUG should not be flagged as w otherwise we can not call DEBUG DIGEST and other commands against read only slaves. 2012-03-20 17:53:47 +01:00
antirez
4f69e70bcd Regression test for the main problem causing issue #141. Minor changes/fixes/additions to the test suite itself needed to write the test. 2012-01-06 17:28:40 +01:00
antirez
9b63d1d81e Redis test: when assertion fails print not just the expression but also expanded values in the error message. 2011-12-21 09:23:22 +01:00
antirez
432123b821 Redis test: wait more time for the server to start if it is running using valgrind. 2011-12-07 17:51:21 +01:00
antirez
48714948b4 Redis test: handle inability to start the server in a better way. 2011-12-07 11:47:38 +01:00
antirez
26d2ed1ce4 more valgrind (and other archs) friendly testing of floating number related features. 2011-11-16 14:40:50 +01:00