YUKI Hiroshi
null+****@clear*****
Tue Jan 29 15:46:20 JST 2013
YUKI Hiroshi 2013-01-29 15:46:20 +0900 (Tue, 29 Jan 2013) New Revision: eb52701396702a5fb722151acf0258801264cbfb https://github.com/groonga/express-kotoumi/commit/eb52701396702a5fb722151acf0258801264cbfb Log: test: When the connection is timed out, no message should be sent Modified files: test/backend-connection.test.js Modified: test/backend-connection.test.js (+3 -9) =================================================================== --- test/backend-connection.test.js 2013-01-29 15:32:44 +0900 (c36fe06) +++ test/backend-connection.test.js 2013-01-29 15:46:20 +0900 (7ee9b97) @@ -301,20 +301,14 @@ suite('Connection, basic features', function() { callback.takes(Connection.ERROR_GATEWAY_TIMEOUT, null); message = connection.emitMessage('testRequest', { command: 'foobar' }, callback, { timeout: 1, - delay: 1000 + delay: 10 }); assert.envelopeEqual(message, createExpectedEnvelope('testRequest', { command: 'foobar' })); }) - .wait(0.01) - .next(function() { - assert.equal(backend.received.length, 1); - assert.deepEqual(backend.received[0][2], message); - assert.equal(connection.listeners('inReplyTo:' + message.id).length, 1); - - }) - .wait(0.01) + .wait(0.05) .next(function() { + assert.equal(backend.received.length, 0); assert.equal(connection.listeners('inReplyTo:' + message.id).length, 0); callback.assert(); done(); -------------- next part -------------- HTML����������������������������...Download