Kouhei Sutou
null+****@clear*****
Sat Jul 20 19:15:01 JST 2013
Kouhei Sutou 2013-07-20 19:15:01 +0900 (Sat, 20 Jul 2013) New Revision: f7fa792f889037e1b729cc4b6dde39291bade10e https://github.com/groonga/express-droonga/commit/f7fa792f889037e1b729cc4b6dde39291bade10e Message: test: use emittedCallback instead of wait() It is environment dependent way that waiting a message is emitted by wait(). It means that a test may be success or failure. Modified files: test/backend-connection.test.js Modified: test/backend-connection.test.js (+10 -2) =================================================================== --- test/backend-connection.test.js 2013-07-20 19:09:18 +0900 (7ed8bd8) +++ test/backend-connection.test.js 2013-07-20 19:15:01 +0900 (35baba8) @@ -436,9 +436,17 @@ suite('Connection', function() { test('disconnected suddenly', function(done) { var errorHandler; var restartedBackend; - connection.emitMessage('test', { message: true }); Deferred - .wait(0.01) + .next(function() { + var deferred = new Deferred(); + connection.emitMessage('test', { message: true }, null, + { + emittedCallback: function () { + deferred.call(); + } + }); + return deferred; + }) .next(function() { assert.equal(backend.received.length, 1, -------------- next part -------------- HTML����������������������������...Download