We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b74e65c commit 164b656Copy full SHA for 164b656
test/redis/redis.spec.js
@@ -5,21 +5,13 @@ const config = require('../../config').common.redisCache;
5
const cache = new RedisCache({
6
host: config.host,
7
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
+ maxRetriesPerRequest: 20
17
});
18
describe('redis', () => {
19
test.only('connection', () =>
20
cache
21
.set('keyTest', 'TEST')
22
- .then(
+ .then(() =>
23
24
.get('keyTest')
25
.then(value => expect(value).toEqual('TEST'))
0 commit comments