Commit Graph

80 Commits

Author SHA1 Message Date
Wolfgang Richter
37a840dc2c Emphasize size_t length for %b formatting
Closes #121.
2013-07-10 23:05:39 -07:00
Pieter Noordhuis
49de2cf990 Fix DNS error test (fixes #167) 2013-07-10 21:58:10 -07:00
Pieter Noordhuis
94675ea8c8 Merge branch 'gai_strerror'
See pull request #153.
2013-05-01 09:32:10 -07:00
Pieter Noordhuis
b1f07f77d2 Fix style 2013-05-01 09:32:03 -07:00
Aaron Bedra
fca66b9e8b Set error when invalid timeout value is given to redisConnectWithTimeout
Closes #154

This commit properly sets the error value inside of
redisContextWaitReady when an invalid sec or usec value is provided.
Tests for each case are provided to demonstrate that the issue is
properly fixed and to avoid regression.

Signed-off-by: Aaron Bedra <aaron@aaronbedra.com>
2013-03-14 21:34:21 -05:00
Thordur Bjornsson
e5589afdec Fix tests for test_blocking_connection_errors();
Add strings to allow OpenBSD/OSX to pass.
2013-02-23 10:51:24 +01:00
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