summaryrefslogtreecommitdiff
path: root/test.c
AgeCommit message (Collapse)Author
2016-05-14test: Add regression test for sds argv formattingJan-Erik Rediger
2016-04-20Auto merge of #379 - thomaslee:tom_test_race, r=badboynot-a-robot
Fix potential race in 'invalid timeout' tests It's possible for the call to connect() to succeed on the very first try, in which case the logic for checking for invalid timeout fields is never executed. When this happens, the tests fail because they expect a REDIS_ERR_IO but no such failure has occurred. Tests aside, this is a potential source of irritating and hard-to-find intermittent bugs. This patch forces the validation to occur early so that we get predictable behavior whenever an invalid timeout is specified.
2016-04-20Add CI for Windowsowent
- fix macro problem in mingw-gcc - fix typedef in cygwin
2016-04-17test.c: Fix shadowed name with typedef when compiling with -WshadowJerry Jacobs
2015-11-18Fix potential race in 'invalid timeout' testsTom Lee
It's possible for the call to connect() to succeed on the very first try, in which case the logic for checking for invalid timeout fields is never executed. When this happens, the tests fail because they expect a REDIS_ERR_IO but no such failure has occurred. Tests aside, this is a potential source of irritating and hard-to-find intermittent bugs. This patch forces the validation to occur early so that we get predictable behavior whenever an invalid timeout is specified.
2015-09-16Add FreeBSD message to test_blocking_connection_errors.olgeni
2015-04-16Implement a reconnect method for the client contextJan-Erik Rediger
Originally implemented by @abedra as part of #306. In case a write or read times out, we force an error state, because we can't guarantuee that the next read will get the right data. Instead we need to reconnect to have a clean-state connection, which is now easily possible with this method.
2015-04-16Make this work on Redis 3.0Jan-Erik Rediger
2015-02-18Fix tests when assert() undefinedMatt Stancliff
Closes #309 (such as when -DNDEBUG disables all assert() macros) Inspired by keith-bennett-gbg, but re-rewritten to be more concise.
2015-01-22Cleanup memory during testMatt Stancliff
2015-01-08Use known-bad hostname when testing hostname failMatt Stancliff
Suggested at https://github.com/redis/hiredis/issues/294#issuecomment-69153074 This change also makes the test stop hanging for 10 to 30 seconds waiting for the resolver to timeout. Now the resolver immediately sees the hostname is bad and returns error without waiting for timeout.
2015-01-08Update test error message detection for dead hostsMatt Stancliff
Fixes #294
2014-05-29Add tests for redisFree() and freeReplyObject()Daniel Melani
Test that redisFree() and freeReplyObject() do not crash when NULL is passed in.
2014-04-09Add new redisAppendFormatedCommand with testsAxel Etcheverry
Closes #202
2014-04-09Fix "host cannot be resolved test" testripcurld00d
Closes #186
2014-04-09Add redisConnectFd() and redisFreeKeepFd()Eddy Jansson
These allows for easier integration of hiredis with external code that wants to manage its fds, say for instance in a pool. Closes #223
2013-07-10Emphasize size_t length for %b formattingWolfgang Richter
Closes #121.
2013-07-10Fix DNS error test (fixes #167)Pieter Noordhuis
2013-05-01Merge branch 'gai_strerror'Pieter Noordhuis
See pull request #153.
2013-05-01Fix stylePieter Noordhuis
2013-03-14Set error when invalid timeout value is given to redisConnectWithTimeoutAaron Bedra
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-02-23Fix tests for test_blocking_connection_errors();Thordur Bjornsson
Add strings to allow OpenBSD/OSX to pass.
2013-01-22Made connect functions return NULL on alloc failures.Henri Doreau
Updated documentation and examples accordingly.
2012-08-27Test new maximum depth of multi-bulk repliesPieter Noordhuis
2011-12-20more error messagesChip Salzenberg
2011-12-02increase read depth by one, would allow ruby redis client to read from slowlogmrb
2011-07-10Colorize test outcomePieter Noordhuis
2011-07-10Test all supported types for printf-like formattingPieter Noordhuis
2011-07-09Abort on invalid formatPieter Noordhuis
There is no way we can guess the width of the argument when we cannot infer its type from the format specifier.
2011-07-09Update printf-formatting tests to failPieter Noordhuis
2011-06-19Revert "Add function to retrieve formatted reply"Pieter Noordhuis
This reverts commit 77540aa31694aa1e14d41f60a0452e49a2fed86a. 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-18Remove private feature macros for Solaris from compiler flagsPieter Noordhuis
2011-06-18Fix compiler warningsPieter Noordhuis
2011-06-09Fix for issue #45Pieter Noordhuis
2011-06-09Flag to disable throughput testsPieter Noordhuis
2011-05-29Exit with a non-zero status when tests failedPieter Noordhuis
2011-05-22More control over host/port and unix path in test.cPieter Noordhuis
2011-05-22Add "make check" target (useful for automated tests).Piotr Sikora
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-05Add function to retrieve formatted replyPieter Noordhuis
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-04-21Reflect rename in testsPieter Noordhuis
2011-04-21Create protocol reader when creating contextPieter Noordhuis
2011-04-21State should not be reset after protocol errorPieter Noordhuis
2011-04-19Use variable for throughput test iteration countPieter Noordhuis
2011-03-31Add pipelined throughput testsPieter Noordhuis
2011-03-06Fix formatCommand to work with all empty interpolationsPieter Noordhuis
2011-01-27Properly reset state after protocol error in reply readerPieter Noordhuis
2011-01-27Avoid warnings with -Wstrict-prototypesPieter Noordhuis
2011-01-07Return error on socket timeout for a blocking contextPieter Noordhuis
2010-12-02Add (nearly) full printf support by delegating to vsprintfPieter Noordhuis
2010-11-24Set error on unexpected nesting of multi bulksPieter Noordhuis