diff --git a/build.xml b/build.xml index b50f66f..88d868b 100644 --- a/build.xml +++ b/build.xml @@ -282,6 +282,7 @@ + @@ -361,6 +362,7 @@ + diff --git a/patches/test/simple/test-cluster-http-pipe.js.patch b/patches/test/simple/test-cluster-http-pipe.js.patch new file mode 100644 index 0000000..f8a8c38 --- /dev/null +++ b/patches/test/simple/test-cluster-http-pipe.js.patch @@ -0,0 +1,16 @@ +--- ../nodejs/test/simple/test-cluster-http-pipe.js 2013-12-17 11:28:18.666118948 -0800 ++++ test/simple/test-cluster-http-pipe.js 2013-12-17 11:38:54.817131582 -0800 +@@ -40,6 +40,13 @@ + process.exit(); + }); + process.on('exit', function() { ++ // We need to remove the pipe after the test exits ++ // because it causes an EADDRINUSE error when other test try to use the same pipe. ++ var fs = require('fs'); ++ var exists = fs.existsSync(common.PIPE); ++ if (exists) { ++ fs.unlinkSync(common.PIPE); ++ } + assert(ok); + }); + return; diff --git a/project.properties b/project.properties index 8add94e..2c316ec 100644 --- a/project.properties +++ b/project.properties @@ -137,6 +137,7 @@ source.test.simple.list = \ test-cluster-master-kill.js \ test-cluster-message.js \ test-cluster-net-listen.js \ + test-cluster-net-send.js \ test-cluster-setup-master.js \ test-cluster-uncaught-exception.js \ test-cluster-worker-death.js \ diff --git a/src/main/js/net/java/avatar/js/pipe_wrap.js b/src/main/js/net/java/avatar/js/pipe_wrap.js index 5f59967..6cadf6b 100644 --- a/src/main/js/net/java/avatar/js/pipe_wrap.js +++ b/src/main/js/net/java/avatar/js/pipe_wrap.js @@ -86,7 +86,7 @@ return new PipeHandle(loop, handle, true); } }, avatarContext, LibUVPermission.HANDLE); - var p = new Pipe(pipeHandle); + var p = new Pipe(true, pipeHandle); that.onread(data, 0, data.length, p); } else if (type == UV_TCP) { var socket = AccessController.doPrivileged(new PrivilegedAction() {