[Groonga-commit] groonga/express-droonga at dbdcf1c [master] test: fix wrong wait event...

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Jul 20 19:30:58 JST 2013


Kouhei Sutou	2013-07-20 19:30:58 +0900 (Sat, 20 Jul 2013)

  New Revision: dbdcf1ce82977dc0dc2783779a32ad02ed6bb868
  https://github.com/groonga/express-droonga/commit/dbdcf1ce82977dc0dc2783779a32ad02ed6bb868

  Message:
    test: fix wrong wait event...
    
    We should wait until backend receives an emitted message.

  Modified files:
    test/backend-connection.test.js

  Modified: test/backend-connection.test.js (+4 -6)
===================================================================
--- test/backend-connection.test.js    2013-07-20 19:19:25 +0900 (4818a37)
+++ test/backend-connection.test.js    2013-07-20 19:30:58 +0900 (48f9356)
@@ -439,12 +439,10 @@ suite('Connection', function() {
       Deferred
         .next(function() {
           var deferred = new Deferred();
-          connection.emitMessage('test', { message: true }, null,
-                                 {
-                                   emittedCallback: function() {
-                                     deferred.call();
-                                   }
-                                 });
+          connection.emitMessage('test', { message: true });
+          backend.once("receive", function() {
+            deferred.call();
+          });
           return deferred;
         })
         .next(function() {
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index