Skip to content

Commit 164b656

Browse files
committed
HotFix
1 parent b74e65c commit 164b656

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

test/redis/redis.spec.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,13 @@ const config = require('../../config').common.redisCache;
55
const cache = new RedisCache({
66
host: config.host,
77
db: config.name,
8-
maxRetriesPerRequest: 2,
9-
reconnectOnError: err => {
10-
const targetError = 'READONLY';
11-
if (err.message.slice(0, targetError.length) === targetError) {
12-
// Only reconnect when the error starts with "READONLY"
13-
return true;
14-
}
15-
return false;
16-
}
8+
maxRetriesPerRequest: 20
179
});
1810
describe('redis', () => {
1911
test.only('connection', () =>
2012
cache
2113
.set('keyTest', 'TEST')
22-
.then(
14+
.then(() =>
2315
cache
2416
.get('keyTest')
2517
.then(value => expect(value).toEqual('TEST'))

0 commit comments

Comments
 (0)