[Groonga-commit] groonga/express-droonga at 6525971 [master] test: wait two "receive" events because a failed message is resent

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Jul 20 23:59:48 JST 2013


Kouhei Sutou	2013-07-20 23:59:48 +0900 (Sat, 20 Jul 2013)

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

  Message:
    test: wait two "receive" events because a failed message is resent

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

  Modified: test/backend-connection.test.js (+7 -7)
===================================================================
--- test/backend-connection.test.js    2013-07-20 23:57:06 +0900 (aa5e1ce)
+++ test/backend-connection.test.js    2013-07-20 23:59:48 +0900 (3efa034)
@@ -491,17 +491,17 @@ suite('Connection', function() {
 
           var deferred = new Deferred();
           restartedBackend.once("receive", function() {
-            deferred.call();
+            restartedBackend.once("receive", function() {
+              deferred.call();
+            });
           });
           return deferred;
         })
         .next(function() {
-          assert.equal(backend.received.length,
-                       1,
-                       'no new message should be sent to the old backend' + JSON.stringify(backend.received));
-          assert.equal(restartedBackend.received.length,
-                       1,
-                       'message should be sent to the new backend' + JSON.stringify(restartedBackend.received));
+          assert.deepEqual(extractTypes(backend.received),
+                           ['type1']);
+          assert.deepEqual(extractTypes(restartedBackend.received),
+                           ['type2', 'type3']);
           done();
         })
         .error(function(error) {
-------------- next part --------------
HTML����������������������������...
Download 



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