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

Merge branch 'select_db_exception' of https://github.com/roamm/node_redis into roamm-select_db_exception

This commit is contained in:
Bryce Baril
2013-03-26 21:47:09 -07:00
2 changed files with 28 additions and 2 deletions

21
test.js
View File

@@ -724,6 +724,27 @@ tests.reconnect = function () {
});
};
tests.reconnect_select_db_after_pubsub = function() {
var name = "reconnect_select_db_after_pubsub";
client.select(test_db_num);
client.set(name, "one");
client.subscribe('ChannelV', function (err, res) {
client.stream.destroy();
});
client.on("reconnecting", function on_recon(params) {
client.on("ready", function on_connect() {
client.unsubscribe('ChannelV', function (err, res) {
client.get(name, require_string("one", name));
client.removeListener("connect", on_connect);
client.removeListener("reconnecting", on_recon);
next(name);
});
});
});
};
tests.idle = function () {
var name = "idle";