-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
porting tests from hand-rolled artisinal test-suite to mocha #793
Conversation
Add test for reconnect. Run each test for both parsers and both IP versions. Don't save a reference to this nodified assertion function. Add DEBUG env var which enables extra debug logging in node_redis. Remove Grunt, run Redis on 6378 for non-interference. Remove the tests already ported to Mocha. Port reconnect after pubsub test; add subscribed after reconnect test. Reconnet after pubsub test confused me. I don't think it tested anything, and it didn't pass for me after I ported it. I've disabled it and added a note. In its place, I've added a test to make sure we are still subscribed and can receive pubsub messages after a reconnect. Move test suite config-like stuff into a library. Move test suite createClient args generation into the config library. WIP. Some select tests, most disabled and still WIP.
Move a miscategorized select test into the correct describe.
Fix error in organization of connection Mocha tests. Clarify some test descriptions in 'set' Mocha tests. Add some tests for mset. Remove old 'set' tests. Add some Mocha tests for 'get'. Add tests for 'getset'. Add tests for 'dbsize'. Add 'flushdb' tests. Add tests for 'incr'.
…a ton of tests around the multi command
smoke test large list of commands ported more tests to mocha, some slight cleanup in tests move sinon and uuid to dev dependencies finished porting eval tests over to mocha rebased mocha testing branch with master ported client and script tests ported watch tests ported detect_buffers tests ported unref tests ported auth tests over to mocha ported idle and no_delay tests ported hlen, hset continuing marching forward ported hincrby, sinter, sort, pubsub tests. improved logic in redis-process, I was still occasionally having issues where redis failed to exit. switch back to default test command ported del, exists, hlen, keys, randomkey, type cleanup based on what I've learned so far from refactor. we now start and stop redis less often. moved tests to their final resting place finished porting node_redis client tests ported hgetall, mget, msetnx, rename, renamenx, setex, setnx ported hgetall, mget, msetnx, rename, renamenx, setex, setnx ported queue tests to mocha amalgamated some of the helper logic ported sadd, scard, sismember, srem, utf-8
I love this so much. I will review it tomorrow. |
So awesome. I'll get my eyeballs on it later today. |
// reconnect_select_db_after_pubsub | ||
// Does not pass. | ||
// "Connection in subscriber mode, only subscriber commands may be used" | ||
xit("reconnects, unsubscribes, and can retrieve the pre-existing data", function (done) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is one I ported from the old suite. IIRC, it was formatted incorrectly in the old suite and was reporting passing when it should have been reporting failing. Does the description of this test describe behavior that should work, such that we need to enter an issue to fix the bug in node_redis, or is node_redis behaving as it should, such that we should delete this test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to try to get this one test working, just finishing porting the final methods first.
Everything looks good to me. This will be a great addition. |
LGTM, too. Ship it! |
porting tests from hand-rolled artisinal test-suite to mocha
Note: this is a squashed version of https://github.com/NodeRedis/node_redis/tree/mocha-test-suite-no-grunt, since we're getting close to completing this task.
We're on the home stretch of the work being done for #778, I would love to get some eyeballs on this.
reviewers: @erinspice, @blainsmith