Skip to content

Commit 7eca330

Browse files
pabloerhardBridgeAR
authored andcommitted
chore(redis): prepare redis tests for redis v6 (#9027)
1 parent b8401e5 commit 7eca330

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

packages/datadog-plugin-redis/test/client.spec.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,16 @@ describe('Plugin', () => {
2727
it('should support queue options', async () => {
2828
tracer = require('../../dd-trace')
2929
redis = require(`../../../versions/${moduleName}@${version}`).get()
30-
const client = redis.createClient({ url: 'redis://127.0.0.1:6379', commandsQueueMaxLength: 1 })
31-
const connectPromise = client.connect()
30+
const client = redis.createClient({ url: 'redis://127.0.0.1:6379', commandsQueueMaxLength: 5 })
31+
await client.connect()
3232
const passingPromise = client.get('foo')
3333
await assert.rejects(Promise.all([
3434
passingPromise,
35-
client.get('bar'),
36-
connectPromise,
35+
client.get('a'),
36+
client.get('b'),
37+
client.get('c'),
38+
client.get('d'),
39+
client.get('e'),
3740
]), {
3841
message: /queue/,
3942
})
@@ -352,7 +355,9 @@ describe('Plugin', () => {
352355
describe('with filter', () => {
353356
before(() => {
354357
return agent.load('redis', {
355-
filter: (command) => command !== 'SET' && command !== 'CLIENT',
358+
filter: (command) => {
359+
return command !== 'SET' && command !== 'CLIENT' && command !== 'HELLO'
360+
},
356361
})
357362
})
358363

0 commit comments

Comments
 (0)