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

Fix test on appveyor

Somehow the calls do not seem to be handled sync on appveyor in this test
This commit is contained in:
Ruben Bridgewater
2015-11-23 14:26:29 +01:00
parent f82fb6cf42
commit 9ca2d1ddaa
2 changed files with 7 additions and 3 deletions

View File

@@ -24,8 +24,8 @@ install:
# Get the latest stable version of Node 0.STABLE.latest # Get the latest stable version of Node 0.STABLE.latest
- ps: Install-Product node $env:nodejs_version - ps: Install-Product node $env:nodejs_version
# Typical npm stuff. Use msvs 2013 for the hiredis parser # Typical npm stuff. Use msvs 2013 for the hiredis parser
- npm install hiredis --msvs_version=2013
- npm install - npm install
- npm install hiredis --msvs_version=2013
# Post-install test scripts. # Post-install test scripts.
test_script: test_script:

View File

@@ -67,18 +67,22 @@ describe("The 'client' method", function () {
client2.end(true); client2.end(true);
}); });
it('sets the name', function (done) {
helper.serverVersionAtLeast.call(this, client, [2, 6, 9]); helper.serverVersionAtLeast.call(this, client, [2, 6, 9]);
// The querys are auto pipelined and the response is a response to all querys of one client
// per chunk. So the execution order is only garanteed on each client
var end = helper.callFuncAfter(done, 2);
client.client("setname", "RUTH", helper.isString('OK')); client.client("setname", "RUTH", helper.isString('OK'));
client2.client("setname", "RENEE", helper.isString('OK')); client2.client("setname", "RENEE", helper.isString('OK'));
client2.client("setname", "MARTIN", helper.isString('OK')); client2.client("setname", "MARTIN", helper.isString('OK'));
client2.client("getname", function(err, res) { client2.client("getname", function(err, res) {
assert.equal(res, 'MARTIN'); assert.equal(res, 'MARTIN');
end();
}); });
client.client("getname", function(err, res) { client.client("getname", function(err, res) {
assert.equal(res, 'RUTH'); assert.equal(res, 'RUTH');
done(); end();
}); });
}); });