You've already forked node-redis
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:
21
test.js
21
test.js
@@ -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";
|
||||
|
||||
|
Reference in New Issue
Block a user