Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Fix for first run fail of slowlog test #381

wants to merge 3 commits into from

2 participants


Have added a fix for first run fail of the slowlog tests.

Please refer to the commit for the fix.

@DTrejo @brycebaril there was a minor glitch in the test code, that caused the test to fail in the first attempt. I had a running server so i was not able repro this issue before. Thanks @brycebaril for pointing out.

@nitesh123 nitesh123 referenced this pull request

Test for slowlog #295

@DTrejo DTrejo closed this in 92ac625

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 27, 2012
  1. @nitesh123

    test for slowlog

    nitesh123 authored
Commits on Feb 20, 2013
  1. @nitesh123
  2. @nitesh123

    fix: test for slowlog

    nitesh123 authored
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 11 deletions.
  1. +12 −11 test.js
23 test.js
@@ -1588,17 +1588,18 @@ tests.ENABLE_OFFLINE_QUEUE_FALSE = function () {
tests.SLOWLOG = function () {
var name = "SLOWLOG";
- client.slowlog('reset',require_string("OK", name));
- client.config('set', 'slowlog-log-slower-than', 0,require_string("OK", name));
- client.set('foo','bar',require_string("OK", name));
- client.get('foo',require_string("bar", name));
- client.slowlog('get',function(err,res){
- assert.equal(res.length, 4, name);
- assert.equal(res[0][3].length, 2, name);
- assert.deepEqual(res[1][3], ['set', 'foo', 'bar'], name);
- assert.deepEqual(res[3][3], ['slowlog', 'reset'], name);
- next(name);
- });
+ client.config('set', 'slowlog-log-slower-than', 0, require_string("OK", name));
+ client.slowlog('reset', require_string("OK", name));
+ client.set('foo', 'bar', require_string("OK", name));
+ client.get('foo', require_string("bar", name));
+ client.slowlog('get', function (err, res) {
+ assert.equal(res.length, 3, name);
+ assert.equal(res[0][3].length, 2, name);
+ assert.deepEqual(res[1][3], ['set', 'foo', 'bar'], name);
+ assert.deepEqual(res[2][3], ['slowlog', 'reset'], name);
+ client.config('set', 'slowlog-log-slower-than', 10000, require_string("OK", name));
+ next(name);
+ });
// TODO - need a better way to test auth, maybe auto-config a local Redis server or something.
Something went wrong with that request. Please try again.