File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ Features
1515 - The ` drain ` event is from now on only emitted if the stream really had to buffer
1616- Reduced the default connect_timeout to be one hour instead of 24h ([ @BridgeAR ] ( https://github.com/BridgeAR ) )
1717- Added .path to redis.createClient(options); ([ @BridgeAR ] ( https://github.com/BridgeAR ) )
18+ - Ignore info command, if not available on server ([ @ivanB1975 ] ( https://github.com/ivanB1975 ) )
1819
1920Bugfixes
2021
Original file line number Diff line number Diff line change @@ -266,6 +266,18 @@ describe("connection tests", function () {
266266 } ) ;
267267 } ) ;
268268
269+ it ( "connects correctly even if the info command is not present on the redis server" , function ( done ) {
270+ client = redis . createClient . apply ( redis . createClient , args ) ;
271+ client . info = function ( cb ) {
272+ // Mock the result
273+ cb ( new Error ( "ERR unknown command 'info'" ) ) ;
274+ } ;
275+ client . once ( "ready" , function ( ) {
276+ assert . strictEqual ( Object . keys ( client . server_info ) . length , 0 ) ;
277+ done ( ) ;
278+ } ) ;
279+ } ) ;
280+
269281 it ( "works with missing options object for new redis instances" , function ( ) {
270282 // This is needed for libraries that have their own createClient function like fakeredis
271283 client = new redis . RedisClient ( { on : function ( ) { } } ) ;
You can’t perform that action at this time.
0 commit comments