Henri Doreau
814be4f5bd
Made connect functions return NULL on alloc failures.
...
Updated documentation and examples accordingly.
2013-01-22 10:19:46 +01:00
Pieter Noordhuis
05d0608ab9
Test new maximum depth of multi-bulk replies
2012-08-27 23:47:42 -07:00
Chip Salzenberg
1d5e27f6d7
more error messages
2011-12-20 10:05:57 -08:00
mrb
52a29a124b
increase read depth by one, would allow ruby redis client to read from slowlog
2011-12-02 08:45:13 -05:00
Pieter Noordhuis
b52193977e
Colorize test outcome
2011-07-10 17:36:07 +02:00
Pieter Noordhuis
dad240f0a3
Test all supported types for printf-like formatting
2011-07-10 17:25:55 +02:00
Pieter Noordhuis
2da784ce8f
Abort on invalid format
...
There is no way we can guess the width of the argument when we cannot
infer its type from the format specifier.
2011-07-09 15:08:45 +02:00
Pieter Noordhuis
4ac55be9b5
Update printf-formatting tests to fail
2011-07-09 15:08:45 +02:00
Pieter Noordhuis
375ba48eea
Revert "Add function to retrieve formatted reply"
...
This reverts commit 77540aa316
. The change
in buffer strategy is too large to put in a minor release. It is put in
a separate branch in the meantime, so it can be refined and released
together with a minor version bump.
2011-06-19 13:41:25 +02:00
Pieter Noordhuis
367ac44ac1
Remove private feature macros for Solaris from compiler flags
2011-06-18 16:28:57 +02:00
Pieter Noordhuis
e0d5c71277
Fix compiler warnings
2011-06-18 12:29:49 +02:00
Pieter Noordhuis
5f5b3d9787
Fix for issue #45
2011-06-09 09:25:09 +02:00
Pieter Noordhuis
159a83ab8a
Flag to disable throughput tests
2011-06-09 09:16:31 +02:00
Pieter Noordhuis
7a8de1fe25
Exit with a non-zero status when tests failed
2011-05-29 10:03:39 -07:00
Pieter Noordhuis
9723a4fc46
More control over host/port and unix path in test.c
2011-05-22 16:26:04 +02:00
Piotr Sikora
5793b999a9
Add "make check" target (useful for automated tests).
...
While there, add "-p" option to "hiredis-test", so that we could run
tests without interrupting Redis instance running on the default port.
2011-05-22 15:24:11 +02:00
Pieter Noordhuis
77540aa316
Add function to retrieve formatted reply
...
This is done by only truncating the read buffer once a full reply has
been read. The buffer is no longer truncated halfway through reading a
reply. In addition: pass offset/length of protocol and content via the
read tasks.
2011-05-05 17:01:34 +02:00
Pieter Noordhuis
19709152f2
Reflect rename in tests
2011-04-21 16:03:54 +02:00
Pieter Noordhuis
6d207ea98e
Create protocol reader when creating context
2011-04-21 15:04:42 +02:00
Pieter Noordhuis
fc790ebea6
State should not be reset after protocol error
2011-04-21 10:54:54 +02:00
Pieter Noordhuis
178024244d
Use variable for throughput test iteration count
2011-04-19 23:03:29 +02:00
Pieter Noordhuis
b4f85484ea
Add pipelined throughput tests
2011-03-31 12:41:46 +02:00
Pieter Noordhuis
8e2c39200d
Fix formatCommand to work with all empty interpolations
2011-03-06 11:38:07 +01:00
Pieter Noordhuis
663d6d1258
Properly reset state after protocol error in reply reader
2011-01-27 14:39:34 +01:00
Pieter Noordhuis
fbe756d838
Avoid warnings with -Wstrict-prototypes
2011-01-27 12:50:55 +01:00
Pieter Noordhuis
43ab0f8018
Return error on socket timeout for a blocking context
2011-01-07 13:04:42 +01:00
Pieter Noordhuis
7684d556bd
Add (nearly) full printf support by delegating to vsprintf
2010-12-02 16:20:55 +01:00
Pieter Noordhuis
257a9d40a9
Set error on unexpected nesting of multi bulks
2010-11-24 15:46:05 +01:00
Pieter Noordhuis
b6b96f776e
Make error messages consistent in casing
2010-11-22 10:37:14 +01:00
Pieter Noordhuis
537e64e946
Tests for behavior when connecting fails
2010-11-22 10:32:37 +01:00
Pieter Noordhuis
7c33f2666b
Make test for formatting commands using a vector more robust
2010-11-22 10:06:43 +01:00
Pieter Noordhuis
cb89a472b6
Fix formatting literal percent characters
2010-11-22 10:00:45 +01:00
Pieter Noordhuis
9d9b8e1c79
Correctly format commands with empty interpolated values
2010-11-22 09:55:54 +01:00
Pieter Noordhuis
650df0f982
Don't do a write(2) after QUIT
...
This causes non-deterministic error messages because sometimes the
socket will already be closed and sometimes it is yet to be closed.
2010-11-19 12:37:06 +01:00
Pieter Noordhuis
0b27639e09
Don't print when testing can continue
2010-11-15 20:17:31 +01:00
Pieter Noordhuis
a5acb58948
Redis >=2.1 replies with OK on QUIT, so make the test conditional
2010-11-15 20:16:01 +01:00
Pieter Noordhuis
1c39483434
Include signal.h
2010-11-05 17:24:11 +01:00
Pieter Noordhuis
8ce0b3228d
Finding \r\n without strstr is a little harder
2010-11-04 23:52:47 +01:00
Pieter Noordhuis
2e5e9a49fd
Return the reply type when the reply object function set is NULL
2010-11-04 13:15:44 +01:00
Pieter Noordhuis
bea6c4bde2
Check replies in throughput test
2010-11-03 11:43:01 +01:00
Pieter Noordhuis
f25a5267cc
Allow to connect using a unix socket from hiredis
2010-11-03 11:38:26 +01:00
Pieter Noordhuis
ffa8666a64
Change error reporting to have an explicit type
...
When there is an I/O error, errno should be used to find out what is
wrong. In other cases, errno cannot be used. So, use an explicit type in
Hiredis to define the different error scenarios that can occur.
2010-11-02 16:36:38 +01:00
Pieter Noordhuis
f463734e91
Remove reply object functions from connect functions
2010-10-31 12:53:57 +01:00
Pieter Noordhuis
298e9325d7
First step in decoupling reply callbacks from internals
2010-10-31 10:56:24 +01:00
Pieter Noordhuis
a3a405bcba
Format a command using an argument vector
2010-10-31 10:34:29 +01:00
Pieter Noordhuis
bc5dcdbc85
Status replies should have type REDIS_REPLY_STATUS
2010-10-30 17:49:39 +02:00
Pieter Noordhuis
171b5a24d4
Drop dependency on sds.h for exposed API
2010-10-30 17:47:19 +02:00
Pieter Noordhuis
0f745d1ac0
Run pending callbacks with NULL reply on redisDisconnect()
2010-10-19 21:26:06 +02:00
Pieter Noordhuis
bbe007a75a
Test helper for creating a non-blocking connection
2010-10-19 21:24:30 +02:00
Pieter Noordhuis
d4b4a9128e
Revert e5dd32d8
that added the const qualifier for command callbacks
2010-10-19 21:24:30 +02:00