1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

feat: add auto pipeline

This commit is contained in:
Ruben Bridgewater
2017-05-28 04:31:37 +02:00
parent 8c63233968
commit 0d53d3dcdf
8 changed files with 79 additions and 121 deletions

View File

@@ -135,32 +135,6 @@ describe('The nodeRedis client', () => {
})
})
describe('big data', () => {
// Check if the fast mode for big strings is working correct
// TODO: Evaluate if this is still necessary after the refactoring
it.skip('safe strings that are bigger than 30000 characters with multi', () => {
let str = 'foo ಠ_ಠ bar '
while (str.length < 111111) {
str += str
}
let called = false
const temp = client.writeBuffers.bind(client)
assert(client.fireStrings)
client.writeBuffers = function (data) {
called = true
// To increase write performance for strings the value is converted to a buffer
assert(!client.fireStrings)
temp(data)
}
const promise = client.multi().set('foo', str).get('foo').exec().then((res) => {
assert.strictEqual(called, true)
assert.strictEqual(res[1], str)
})
assert(client.fireStrings)
return promise
})
})
describe('sendCommand', () => {
it('omitting args should be fine', () => {
client.serverInfo = {}