[Groonga-commit] groonga/express-kotoumi [master] test: Fix global leak

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Feb 14 11:30:20 JST 2013


YUKI Hiroshi	2013-02-14 11:30:20 +0900 (Thu, 14 Feb 2013)

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

  Log:
    test: Fix global leak

  Modified files:
    test/frontend-socket.io-adaptor.test.js
    test/test-utils.js

  Modified: test/frontend-socket.io-adaptor.test.js (+4 -0)
===================================================================
--- test/frontend-socket.io-adaptor.test.js    2013-02-14 11:28:49 +0900 (7126229)
+++ test/frontend-socket.io-adaptor.test.js    2013-02-14 11:30:20 +0900 (80d06ab)
@@ -142,6 +142,7 @@ suite('Socket.IO API', function() {
           .next(function(result) {
             server     = result.server;
             connection = result.connection;
+            backend    = result.backend;
             socketIoAdaptor.register(result.application, server, {
               tag:      'test',
               connection: connection,
@@ -234,6 +235,7 @@ suite('Socket.IO API', function() {
         .next(function(result) {
           server     = result.server;
           connection = result.connection;
+          backend    = result.backend;
           socketIoAdaptor.register(result.application, server, {
             tag:      'test',
             connection: connection,
@@ -310,6 +312,7 @@ suite('Socket.IO API', function() {
           .next(function(result) {
             server     = result.server;
             connection = result.connection;
+            backend    = result.backend;
             socketIoAdaptor.register(result.application, server, {
               tag:      'test',
               connection: connection,
@@ -396,6 +399,7 @@ suite('Socket.IO API', function() {
         .next(function(result) {
           server     = result.server;
           connection = result.connection;
+          backend    = result.backend;
           socketIoAdaptor.register(result.application, server, {
             tag:      'test',
             connection: connection,

  Modified: test/test-utils.js (+3 -2)
===================================================================
--- test/test-utils.js    2013-02-14 11:28:49 +0900 (e9ba890)
+++ test/test-utils.js    2013-02-14 11:30:20 +0900 (b35d740)
@@ -231,7 +231,7 @@ function setupApplication() {
     .createBackend()
     .next(function(newBackend) {
       backend = newBackend;
-      connection = new Connection({
+      var connection = new Connection({
         tag:      'test',
         hostName: 'localhost',
         port:     testSendPort,
@@ -242,7 +242,8 @@ function setupApplication() {
       return {
         backend:     backend,
         server:      server,
-        application: application
+        application: application,
+        connection:  connection
       };
     });
 }
-------------- next part --------------
HTML����������������������������...
Download 



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