Commit Graph

112 Commits

Author SHA1 Message Date
antirez
25fd2cb284 a few more stuff in INFO about VM. Test #11 changed a bit in order to be less lame 2010-01-12 09:57:00 -05:00
antirez
4409877e19 not yet working BLPOP implementation 2009-12-29 14:59:40 -05:00
antirez
81d456450a ZRANGE WITHSCORES test added 2009-12-23 11:12:01 -05:00
antirez
0447be2efe the pipelining test was ran against DB 1 for error, now it runs on DB 9 like all the other tests 2009-12-18 15:39:19 -05:00
antirez
98e1bb8136 still more tests 2009-12-18 09:19:36 -05:00
antirez
5384a2d82e SORT STORE test added 2009-12-18 09:09:18 -05:00
antirez
d922ae6592 Now SORT returns an empty bulk reply if the key does not exist 2009-12-18 09:06:53 -05:00
antirez
04c71068a8 modified a bit the ZREVRANGE test to cover a few lines of code more 2009-12-18 07:51:23 -05:00
antirez
ac945e2dcf SHUTDOWN now does the right thing when append only is on, that is, fsync instead to save the snapshot. 2009-12-18 07:31:44 -05:00
antirez
fdcaae84d3 Added a missing server.dirty increment in a non critical place, added more tests 2009-12-18 07:13:13 -05:00
antirez
c632369b52 LTRIM stress testing test added 2009-12-18 06:56:51 -05:00
antirez
ab9d4cb1e3 LTRIM now returns +OK against non existing keys. More tests in test-redis.tcl 2009-12-18 06:45:26 -05:00
antirez
483049a737 Regression for epoll bug in redis-test.tcl, version is now 1.1.93 2009-12-16 08:40:32 -05:00
antirez
e96e4fbf15 Two important fixes to append only file: zero length values and expires. A pretty neat new test to check consistency of randomly build datasets against snapshotting and AOF. 2009-12-15 13:06:41 -05:00
antirez
71c2b467b0 debug loadaof implemented in order to add more consistency tests in test-redis.tcl 2009-12-15 11:15:47 -05:00
antirez
e054afda90 Added a new test able to stress a lot the snapshotting engine 2009-12-15 10:55:13 -05:00
antirez
7c49733ce3 Fixed some subtle bug in the command processing code almost impossible to spot in the real world, thanks to gcov 2009-12-15 09:14:40 -05:00
antirez
f4d9b3c62a Regression test for SINTERSTORE added 2009-12-15 04:26:51 -05:00
antirez
0d36ded040 Fixed issue #121 2009-12-15 04:06:10 -05:00
antirez
fc77604c47 a few more tests and ability to run a specific test in test-redis.tcl 2009-12-14 13:48:24 -05:00
antirez
5acdc75d66 Regression tests for SETNX and MSETNX bugs added 2009-12-06 01:16:12 +01:00
antirez
9c21a518c3 design documents added to the project 2009-12-01 01:47:58 +01:00
antirez
0b13687c25 more tests in test-redis.tcl, some minor fix 2009-11-29 10:29:08 +01:00
antirez
5b1207c63f ZRANGEBYSCORE fuzzy test 2009-11-28 18:19:11 +01:00
antirez
c74e7c7757 ZRANGEBYSCORE memory leak fixed, ZRANGEBYSCORE initial test added 2009-11-28 18:03:09 +01:00
antirez
7a932b74cc ifdefs added to use kevent on Free Open and Net BSD as well. INFO and ae.c modified in order to report the multiplexing API in use 2009-11-28 17:06:28 +01:00
antirez
1751139117 Enabled object encoding for multiple keys in MSET. Added a test for memory leaks in test-redis.tcl when running on Mac OS X 2009-11-28 16:55:05 +01:00
antirez
210e29f7d2 DEBUG RELOAD implemented, and test-redis.tcl modified to use it to check for persistence consistency. 2009-11-24 21:44:20 +01:00
antirez
6cbfd2b3d9 SRANDMEMBER test 2009-11-21 13:56:17 +01:00
antirez
28173a49a7 SORT GET # implemented, with a test 2009-11-21 13:25:51 +01:00
antirez
5446315f29 EXPIREAT test 2009-11-21 11:15:12 +01:00
antirez
b9febaab5d EXPIRE tests 2009-11-20 14:36:32 +01:00
antirez
b9bb7ba220 more RPOPLPUSH tests 2009-11-20 14:27:09 +01:00
antirez
c08f173487 RPOPLPUSH tests added 2009-11-20 13:57:41 +01:00
antirez
c28b42acd9 more experiments with long replies, glue output buffer, and writev. 2009-11-18 20:32:03 +01:00
antirez
bbf44ecf1b Redis test will not fail the SAVE test even if a background save is in progress 2009-11-12 11:36:51 +01:00
antirez
405b0a6aa5 Workaround for test-redis.tcl and Tcl 8.4.x about ZSCORE test 2009-11-11 23:42:31 +01:00
antirez
12f9d551b6 LPUSHPOP first implementation 2009-11-11 18:38:37 +01:00
antirez
eea4baf70d redis-test is now a better Redis citizen, testing everything against DB 9 and 10 and only if this DBs are empty. 2009-11-04 12:26:57 +01:00
antirez
eaa256ad25 ZSets double to string serialization fixed 2009-11-03 14:36:38 +01:00
antirez
f89c3a3500 redis.tcl put at toplevel since it's uesd for the test-redis.tcl script 2009-11-03 11:28:37 +01:00
antirez
d7f43c081a A lot of ZSETs tests implemented, and a bug fixed thanks to this new tests 2009-10-27 18:31:12 +01:00
antirez
f69f2cbafe Imporant bug leading to data corruption fixed (NOT affecting stable distribution), Tcl client lib MSET/MSETNX implementation fixed, Added new tests for MSET and MSETNX in test-redis.tcl 2009-10-20 11:39:20 +02:00
antirez
724a51b1a9 LREM fixed, used to crash since the new object integer encoding is on the stage 2009-09-18 20:31:47 +02:00
antirez
12fea92890 SPOP implemented. Hash table resizing for Sets and Expires too. Changed the resize policy to play better with RANDOMKEY and SPOP. 2009-06-08 23:51:35 +02:00
antirez
d214bb4894 Aman Gupta changes merged 2009-05-20 10:44:08 +02:00
Aman Gupta
83cdfe182f Fix SINTER/UNIONSTORE to allow for &=/|= style operations (i.e. SINTERSTORE set1 set1 set2) 2009-05-17 14:16:24 -07:00
antirez
f4f56e1dfb SDIFF/SDIFFSTORE implemnted unifying it with the implementation of SUNION/SUNIONSTORE 2009-05-17 13:45:08 +02:00
antirez
cc582a7708 added tests for vararg DEL 2009-05-09 12:32:29 +02:00
antirez
75398fbcae fuzz stresser implemented in redis-test 2009-04-29 19:49:19 +02:00
antirez
0eeb2a4b8f SMOVE test added 2009-04-28 21:19:37 +02:00
antirez
7ac6d4613f GETSET tests 2009-04-28 16:21:16 +02:00
antirez
d68ed1201a INCRBY/DECRBY now support 64bit increments, with tests 2009-04-27 17:50:26 +02:00
antirez
f5785ae997 RANDOMKEY regression test added 2009-04-23 18:48:11 +02:00
antirez
40d224a9e3 SUNION, SUNIONSTORE, Initial work on non blocking replication 2009-04-19 10:02:36 +02:00
antirez
ce7bef0795 RANDOMKEY issue 26 fixed, generic test + regression added 2009-04-08 00:59:53 +02:00
Brian Hammond
abcb223ec0 Adds AUTH command.
$ make
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  adlist.c
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  ae.c
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  anet.c
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  dict.c
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  redis.c
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  sds.c
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  zmalloc.c
cc -o redis-server -O2 -Wall -W -DSDS_ABORT_ON_OOM -g adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o

Hint: To run the test-redis.tcl script is a good idea.
Launch the redis server with ./redis-server, then in another
terminal window enter this directory and run 'make test'.

cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  benchmark.c
cc -o redis-benchmark -O2 -Wall -W -DSDS_ABORT_ON_OOM -g ae.o anet.o benchmark.o sds.o adlist.o zmalloc.o
cc -c -O2 -Wall -W -DSDS_ABORT_ON_OOM -g  redis-cli.c
cc -o redis-cli -O2 -Wall -W -DSDS_ABORT_ON_OOM -g anet.o sds.o adlist.o redis-cli.o zmalloc.o

$ tail -1 redis.conf

$ ./redis-server redis.conf &
[1] 52494
$ - Server started, Redis version 0.08
- DB loaded from disk
- The server is now ready to accept connections on port 6379
. 0 clients connected (0 slaves), 1932 bytes in use

$ make test
tclsh test-redis.tcl
DEL all keys to start with a clean DB                                  . Accepted 127.0.0.1:54490
PASSED
SET and GET an item                                                    PASSED
DEL against a single item                                              PASSED
KEYS with pattern                                                      PASSED
KEYS to get all keys                                                   PASSED
DBSIZE                                                                 PASSED
DEL all keys                                                           PASSED
Very big payload in GET/SET                                            PASSED
SET 10000 numeric keys and access all them in reverse order            . DB 0: 10001 keys in 16384 slots HT.
. 1 clients connected (0 slaves), 4885707 bytes in use
PASSED
DBSIZE should be 10001 now                                             PASSED
INCR against non existing key                                          PASSED
INCR against key created by incr itself                                PASSED
INCR against key originally set with SET                               PASSED
SETNX target key missing                                               PASSED
SETNX target key exists                                                PASSED
EXISTS                                                                 PASSED
Zero length value in key. SET/GET/EXISTS                               PASSED
Commands pipelining                                                    PASSED
Non existing command                                                   PASSED
Basic LPUSH, RPUSH, LLENGTH, LINDEX                                    PASSED
DEL a list                                                             PASSED
Create a long list and check every single element with LINDEX          PASSED
Test elements with LINDEX in random access                             PASSED
LLEN against non-list value error                                      PASSED
LINDEX against non-list value error                                    PASSED
LPUSH against non-list value error                                     PASSED
RPUSH against non-list value error                                     PASSED
RENAME basic usage                                                     PASSED
RENAME source key should no longer exist                               PASSED
RENAME against already existing key                                    PASSED
RENAMENX basic usage                                                   PASSED
RENAMENX against already existing key                                  PASSED
RENAMENX against already existing key (2)                              PASSED
RENAME against non existing source key                                 PASSED
RENAME where source and dest key is the same                           PASSED
DEL all keys again (DB 0)                                              PASSED
DEL all keys again (DB 1)                                              PASSED
MOVE basic usage                                                       PASSED
MOVE against key existing in the target DB                             PASSED
SET/GET keys in different DBs                                          PASSED
Basic LPOP/RPOP                                                        PASSED
LPOP/RPOP against empty list                                           PASSED
LPOP against non list value                                            PASSED
Mass LPUSH/LPOP                                                        PASSED
LRANGE basics                                                          PASSED
LRANGE inverted indexes                                                PASSED
LRANGE out of range indexes including the full list                    PASSED
LRANGE against non existing key                                        PASSED
LTRIM basics                                                           PASSED
LSET                                                                   PASSED
LSET out of range index                                                PASSED
LSET against non existing key                                          PASSED
LSET against non list value                                            PASSED
SADD, SCARD, SISMEMBER, SMEMBERS basics                                PASSED
SADD adding the same element multiple times                            PASSED
SADD against non set                                                   PASSED
SREM basics                                                            PASSED
Mass SADD and SINTER with two sets                                     PASSED
SINTERSTORE with two sets                                              PASSED
SINTER against three sets                                              PASSED
SINTERSTORE with three sets                                            PASSED
SAVE - make sure there are all the types as values                     - DB saved on disk
PASSED
Create a random list                                                   . DB 0: 6057 keys in 16384 slots HT.
. DB 1: 3 keys in 16 slots HT.
. 1 clients connected (0 slaves), 1045147 bytes in use
PASSED
SORT with BY against the newly created list                            PASSED
SORT direct, numeric, against the newly created list                   PASSED
SORT decreasing sort                                                   PASSED
SORT speed, sorting 10000 elements list using BY, 100 times
  Average time to sort: 5.28 milliseconds PASSED
SORT speed, sorting 10000 elements list directly, 100 times
  Average time to sort: 1.53 milliseconds PASSED
SORT speed, pseudo-sorting 10000 elements list, BY <const>, 100 times
  Average time to sort: 0.47 milliseconds PASSED
SORT regression for issue #19, sorting floats                          - DB saved on disk
PASSED
LREM, remove all the occurrences                                       - DB saved on disk
PASSED
LREM, remove the first occurrence                                      PASSED
LREM, remove non existing element                                      PASSED
LREM, starting from tail with negative count                           - DB saved on disk
PASSED
LREM, starting from tail with negative count (2)                       PASSED
MGET                                                                   - DB saved on disk
PASSED
MGET against non existing key                                          PASSED
MGET against non-string key                                            PASSED
FLUSHALL                                                               - DB saved on disk
PASSED

79 tests, 79 passed, 0 failed
. Client closed connection
. 0 clients connected (0 slaves), 1347660 bytes in use

$ kill -15 %1
[1]+  Terminated              ./redis-server redis.conf

$ vim redis.conf

$ tail -1 redis.conf
requirepass foobared

$ ./redis-server redis.conf &
[1] 52518
$ - Server started, Redis version 0.08
- DB loaded from disk
- The server is now ready to accept connections on port 6379
. 0 clients connected (0 slaves), 1945 bytes in use

$ make test
tclsh test-redis.tcl
. Accepted 127.0.0.1:54492
DEL all keys to start with a clean DB

ERR operation not permitted

    while executing
"::redis::redis_read_reply $fd"
    (procedure "::redis::__dispatch__" line 13)
    invoked from within
"$r keys *"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $code"
    (procedure "test" line 4)
    invoked from within
"test {DEL all keys to start with a clean DB} {
        foreach key [$r keys *] {$r del $key}
        $r dbsize
    } {0}"
    (procedure "main" line 13)
    invoked from within
"main 127.0.0.1 6379"
    invoked from within
"if {[llength $argv] == 0} {
    main 127.0.0.1 6379
} elseif {[llength $argv] == 1 && [lindex $argv 0] eq {stress}} {
    stress
} else {
    main [li..."
    (file "test-redis.tcl" line 630)
. Client closed connection
make: *** [test] Error 1
. 0 clients connected (0 slaves), 2041 bytes in use
. 0 clients connected (0 slaves), 2041 bytes in use

$ kill -15 %1
[1]+  Terminated              ./redis-server redis.conf

$ vim test-redis.tcl

$ git diff test-redis.tcl
2009-03-25 23:03:56 -04:00
antirez
43c9dc7bd2 Now the Redis test uses the proper Tcl client library 2009-03-24 20:00:15 +01:00
antirez
c937aa89b5 Server replies now in the new format, test-redis.tcl and redis-cli modified accordingly 2009-03-24 13:37:32 +01:00
antirez
5a6948fbc0 random tested mode for test-redis.tcl, minor other stuff, version switched to 0.8 2009-03-24 00:43:38 +01:00
antirez
5b19bd7238 MGET tests added 2009-03-22 15:27:09 +01:00
antirez
ed9b544e10 first commit 2009-03-22 10:30:00 +01:00