1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

111 Commits

Author SHA1 Message Date
englandpost
3e0762e6ec fix fwd errors test for node >= 0.9.1
it seems that listeners are no longer mutable
* events: Make emitter.listeners() side-effect free (isaacs, Joe Andaverde)
https://raw.github.com/joyent/node/v0.9.1/ChangeLog
2013-04-05 00:44:06 +04:00
Bryce Baril
b0f7760b19 Merge branch 'select_db_exception' of https://github.com/roamm/node_redis into roamm-select_db_exception 2013-03-26 21:47:09 -07:00
roam
6fb7204ca5 Add a test case for reconnect_select_db_after_pubsub 2013-03-18 16:08:58 +08:00
Bryce Baril
d03d747145 Merge branch 'add-retry-max' of https://github.com/tomaszdurka/node_redis into tomaszdurka-add-retry-max 2013-03-17 15:59:40 -07:00
Tomasz Durka
0698a5e627 Formatting 2013-03-17 23:45:51 +01:00
继风
78d8f9ef9c need not send message to server when set undefined value 2013-03-17 18:05:39 +08:00
Joffrey F
ed2652f04c Added reproduction test for #344 in test.js 2013-03-16 09:13:40 -07:00
Jonas Dohse
67e908ad55 Avoid collision between command and internal field 2013-03-15 22:34:32 +01:00
Jonas Dohse
de22a94edd Amend SCRIPT LOAD test cases 2013-03-14 15:55:13 +01:00
Tomasz Durka
38dbacac9f Add retry_max_delay option
- add option
- add test
2013-03-12 12:31:19 +01:00
Bryce Baril
92ed0befc1 In nested MULTIBULK buffers, correctly recurse on an incomplete read buffer.
Signed-off-by: DTrejo <david.daniel.trejo@gmail.com>
2013-03-09 19:27:33 -05:00
Bryce Baril
9127f34393 Parser should only catch parser errors and bubble the rest to the caller.
Signed-off-by: DTrejo <david.daniel.trejo@gmail.com>
2013-03-09 19:27:33 -05:00
Bryce Baril
0c172f425c Fix parser incorrect buffer skip for MULTI/EXEC transaction errors with WATCH.
Signed-off-by: DTrejo <david.daniel.trejo@gmail.com>
2013-03-09 19:27:33 -05:00
Bryce Baril
87132e2b03 Add hiredis guard to INCR test
Signed-off-by: DTrejo <david.daniel.trejo@gmail.com>
2013-03-09 19:27:33 -05:00
DTrejo
405011b640 Revert "hmset throws/errors out on non-string values. fixes #218"
Reverting because this was a documentation problem, not a problem with
the code. Performance-wise, this is faster than the approach in #345, though
it may cause users more trouble. This is okay, if someone opens an issue we
can point them to the docs.

This reverts commit b60e001fa0.

Conflicts:

	index.js
	test.js
2013-02-23 22:56:08 -05:00
DTrejo
a02b0f57e4 test.js: early return if command not supported 2013-02-23 22:43:26 -05:00
Tom Leach
837cec36b6 Detect is an incoming "reply" is in fact a pubsub message. If so, do not pop the command queue.
This fixes an issue where the command queue gets popped prematurely by pubsub
messages, leading to callbacks for those commands not being invoked.

Close #360.

Signed-off-by: DTrejo <david.daniel.trejo@gmail.com>
2013-02-23 22:42:34 -05:00
Jonas Dohse
f0ae6642f9 Use first word of multi word commands
Close #363.

Signed-off-by: DTrejo <david.daniel.trejo@gmail.com>
2013-02-23 22:18:13 -05:00
DTrejo
938c0526a0 EVAL: allow parameters as an array. Close #368.
Signed-off-by: DTrejo <david.daniel.trejo@gmail.com>
2013-02-23 22:05:34 -05:00
Bryce Baril
f3c298d088 Removing order requirement for KEYS test
Close #378.

Signed-off-by: DTrejo <david.daniel.trejo@gmail.com>
2013-02-23 21:11:36 -05:00
Bryce Baril
2a12ca39aa Fixing tests for Redis version 2.6.5+ MULTI/EXEC transaction failure compatibility.
Signed-off-by: DTrejo <david.daniel.trejo@gmail.com>
2013-02-23 21:08:18 -05:00
DTrejo
92ac62541d Fix #381. slowlog test failure on first run. 2013-02-23 21:06:36 -05:00
Nitesh
0f5b43a68c test.js: slowlog. Closes #295
Signed-off-by: DTrejo <david.daniel.trejo@gmail.com>
2013-02-17 20:30:18 -05:00
Garrett Johnson
b5a57b40f7 test.js: smembers reply should not assume order, b/c sets do not ensure order
Closes #326.

Signed-off-by: DTrejo <david.daniel.trejo@gmail.com>
2013-02-17 19:50:14 -05:00
Michael Jackson
7f3f11f9b1 Make return_buffers work with ints 2012-10-26 20:35:19 -07:00
DTrejo
252a77e92a multi_bulk reply test for fix #274 2012-09-21 22:28:30 -04:00
Chakrit Wichian
587d4a361b Add test for GET non-existent-key case. (issue #267) 2012-09-12 01:59:35 +07:00
Kevin Ingersoll
790c783e8d Fix tests w/ support for array as last arg and no errors
Signed-off-by: DTrejo <david.trejo@voxer.com>
2012-08-23 14:18:17 -07:00
Martín Ciparelli
124ea082b9 fixes #218 by expanding last argument array only for sadd command
Also adds a test that uses SADD in caps. Nicely enough, this makes
multi_bench.js run just a tiny bit faster :)

Signed-off-by: DTrejo <david.trejo@voxer.com>
2012-08-17 15:33:32 -07:00
DTrejo
58804e6e27 test.js: HLEN 2012-08-06 18:19:47 -07:00
Ignacio Burgueño
50914baa7f Save and clear client state. Restore it after the connection is ready.
This change stores the connection state regarding subscriptions,
selected db and monitoring. When the connection to Redis drops, the state
is reestablished after a succesful reconnect. Fixes #241. Fixes #210.

Signed-off-by: DTrejo <david.trejo@voxer.com>
2012-07-12 17:19:16 -07:00
DTrejo
1b0b2dc87d index.js: fix enable_offline_queue default. tests pass 2012-07-05 19:18:26 -07:00
Shankar Karuppiah
83dc4c999b Added option to disable offline queue
Signed-off-by: DTrejo <david.trejo@voxer.com>
2012-07-05 19:04:10 -07:00
Trae Robrock
db4f1648d4 Adding tests for idle event
Signed-off-by: DTrejo <david.trejo@voxer.com>
2012-07-05 17:09:26 -07:00
DTrejo
b60e001fa0 hmset throws/errors out on non-string values. fixes #218 2012-06-04 16:13:56 -07:00
Dave Peticolas
874a893c2c test.js: Switch to pubsub mode when the number of channels is > 0.
Tests for a bug where the client unsubscribes
and then subscribes to a single channel. If the
subscription is sent before the response to the
unsubscribe is received, then the client would
leave pubsub mode when it received the unsubscribe
response and then fail to enter when the subsequent
subscription is processed. This is another test for #190:
https://github.com/mranney/node_redis/pull/190

Signed-off-by: David Trejo <david.daniel.trejo@gmail.com>
2012-04-29 23:00:56 -04:00
Matt Ranney
3a7c6388de Fix for [GH-93] - restore subscriptions, monitor, db, and auth on reconnect.
Also fixes bug with re-selecting db when auth is required.
Still needs a test for pub/sub reconnect and monitor reconnect.
2011-11-16 17:27:26 -10:00
Matt Ranney
faca4a8dc9 Bounds checking on Array expansion magic. 2011-11-16 12:10:19 -10:00
Matt Ranney
b9734d13eb Add socket_nodelay option to control Nagle. Fixes [GH-33] 2011-11-16 11:12:26 -10:00
Zachary Scott
c83c285213 remove double 'util' and 'Queue' from requires
ex: require('./lib/util').util;
2011-11-16 10:37:38 -10:00
Matt Ranney
64ad9ede42 Add test for [GH-148] - detect_buffers option 2011-11-15 20:27:56 -10:00
Matt Ranney
69092a3f26 [GH-67] - hgetall now returns null instead of {} on empty reply 2011-11-15 15:21:49 -10:00
Matt Ranney
dfd4c51b79 Merge pull request #136 from bobrik/callback-fixes
added ability to pass undefined instead of callback
2011-11-14 22:15:36 -08:00
Matt Ranney
90aa21936c Update TODO comment 2011-11-14 20:14:49 -10:00
Matt Ranney
8d0457f2c3 Add test for monitor command. 2011-11-13 21:18:12 -10:00
Matt Ranney
719c606b78 Fix test for optional subscribe callback. 2011-11-13 21:03:32 -10:00
Matt Ranney
6232d35993 Subscribe commands take optional callback. Fixes [GH-140]. 2011-11-13 21:01:15 -10:00
Matt Ranney
c74657cdfa Improved reconnect logic. Initial version of reconnect thresholds. 2011-11-10 13:09:39 -10:00
bobrik
0c1c8cab83 added test for optional callbacks 2011-10-15 17:07:40 +04:00
Matt Ranney
3e95c55a03 Fix for [GH-127]
Re-initialize the reply parser for every new connection.  If a connection is terminated,
the parser could be left in a bad state.  After the auto-reconnect magic kicks in, it
tries to reuse the old parser, which will not work.

This change is visible to client programs if you depend on client.reply_parser.name being
set immediately.  It will now only be set after a connection is established.

Thanks to @jhurliman for reporting and @pietern for the fix suggestion.
2011-08-11 11:00:02 -07:00