[Groonga-commit] groonga/express-droonga at 3a84fda [master] test: use closed callback instead of wait()

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Jul 20 23:38:13 JST 2013


Kouhei Sutou	2013-07-20 23:38:13 +0900 (Sat, 20 Jul 2013)

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

  Message:
    test: use closed callback instead of wait()
    
    wait() makes test fragile.

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

  Modified: test/backend-connection.test.js (+5 -2)
===================================================================
--- test/backend-connection.test.js    2013-07-20 23:36:49 +0900 (01ba6c8)
+++ test/backend-connection.test.js    2013-07-20 23:38:13 +0900 (14bf80d)
@@ -455,9 +455,12 @@ suite('Connection', function() {
         .next(function() {
           assert.deepEqual(extractTags(backend.received),
                            ['test.message']);
-          backend.close();
+          var deferred = new Deferred();
+          backend.close(function() {
+            deferred.call();
+          });
+          return deferred;
         })
-        .wait(0.01)
         .createBackend()
         .next(function(newBackend) {
           restartedBackend = newBackend;
-------------- next part --------------
HTML����������������������������...
Télécharger 



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