[Groonga-commit] groonga/express-kotoumi [master] test: Send fluent packet to the receiver of the connection

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Feb 1 11:12:50 JST 2013


YUKI Hiroshi	2013-02-01 11:12:50 +0900 (Fri, 01 Feb 2013)

  New Revision: 2f50511c78feab83b1a569721a087b512d4758c0
  https://github.com/groonga/express-kotoumi/commit/2f50511c78feab83b1a569721a087b512d4758c0

  Log:
    test: Send fluent packet to the receiver of the connection

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

  Modified: test/backend-connection.test.js (+8 -3)
===================================================================
--- test/backend-connection.test.js    2013-02-01 11:01:31 +0900 (5dd8c2e)
+++ test/backend-connection.test.js    2013-02-01 11:12:50 +0900 (83bc3d0)
@@ -221,9 +221,10 @@ suite('Connection, basic features', function() {
                                           'testResponse',
                                           'first call');
         callback.takes(null, response);
-        packet = ['test.message', Date.now(), message];
+        packet = ['test.message', Date.now(), response];
         return utils.sendPacketTo(packet, utils.testReceivePort);
       })
+      .wait(0.01)
       .next(function() {
         callback.assert();
 
@@ -231,6 +232,7 @@ suite('Connection, basic features', function() {
         response.body = 'second call';
         return utils.sendPacketTo(packet, utils.testReceivePort);
       })
+      .wait(0.01)
       .next(function() {
         callback.assert();
         done();
@@ -265,9 +267,10 @@ suite('Connection, basic features', function() {
                                           'first call');
         response.statusCode = 503;
         callback.takes(503, response);
-        packet = ['test.message', Date.now(), message];
+        packet = ['test.message', Date.now(), response];
         return utils.sendPacketTo(packet, utils.testReceivePort);
       })
+      .wait(0.01)
       .next(function() {
         callback.assert();
         done();
@@ -305,9 +308,10 @@ suite('Connection, basic features', function() {
                                           'testResponse',
                                           'first call');
         callback.takes(null, response);
-        packet = ['test.message', Date.now(), message];
+        packet = ['test.message', Date.now(), response];
         return utils.sendPacketTo(packet, utils.testReceivePort);
       })
+      .wait(0.01)
       .next(function() {
         callback.assert();
         assert.equal(connection.listeners('inReplyTo:' + message.id).length,
@@ -386,6 +390,7 @@ suite('Connection, basic features', function() {
         packet = ['test.message', Date.now(), message];
         return utils.sendPacketTo(packet, utils.testReceivePort);
       })
+      .wait(0.01)
       .next(function() {
         callback.assert();
         assert.equal(connection.listeners('inReplyTo:' + message.id).length,
-------------- next part --------------
HTML����������������������������...
Download 



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