Permalink
Browse files

fix paths

  • Loading branch information...
1 parent f73799e commit 3332cc68bfdcb6e9b246a3d1ffe7eb47cd3b986e @jfd committed Apr 9, 2011
@@ -6,7 +6,7 @@ process.on("uncaughtException", function(err) {
});
if (process.argv[2] == "subscriber") {
var count = 0;
- var ch = require("../lib").createChannel("sub");
+ var ch = require("../index").createChannel("sub");
ch.subscribe(new Buffer(0));
ch.connect("tcp://127.0.0.1:7000");
ch.recv = function(msg, data) {
@@ -17,8 +17,8 @@ if (process.argv[2] == "subscriber") {
} else {
var time;
var buffer = new Buffer(MESSAGE_SIZE);
- var worker = require("../lib").spawn(__filename, ["subscriber"], "pipe");
- var ch = require("../lib").createChannel("pub");
+ var worker = require("../index").spawn(__filename, ["subscriber"], "pipe");
+ var ch = require("../index").createChannel("pub");
ch.listen("tcp://127.0.0.1:7000");
ch.on("subscribe", function() {
var c = 0;
@@ -4,16 +4,16 @@ const MESSAGE_SIZE = 1024 * 50;
if (process.argv[2] == "subscriber") {
var count = 0;
- var ch = require("../lib").createChannel("resp");
+ var ch = require("../index").createChannel("resp");
ch.listen("tcp://127.0.0.1:7000");
ch.recv = function(msg, data) {
msg.ok();
};
} else {
var time;
var buffer = new Buffer(MESSAGE_SIZE);
- var worker = require("../lib").spawn(__filename, ["subscriber"], "pipe");
- var ch = require("../lib").createChannel("req");
+ var worker = require("../index").spawn(__filename, ["subscriber"], "pipe");
+ var ch = require("../index").createChannel("req");
ch.connect("tcp://127.0.0.1:7000");
ch.on("connect", function() {
time = Date.now();
@@ -1,7 +1,7 @@
const ok = require("assert").ok
, throws = require("assert").throws
- , createChannel = require("../../lib").createChannel
- , spawn = require("../../lib").spawn
+ , createChannel = require("../../index").createChannel
+ , spawn = require("../../index").spawn
, timeout = require("../common").timeout
, shutdown = require("../common").shutdown
@@ -1,5 +1,5 @@
const equal = require("assert").equal
- , createChannel = require("../../lib").createChannel
+ , createChannel = require("../../index").createChannel
var messages = parseInt(process.argv[2])
, message = process.argv[3]
@@ -1,7 +1,7 @@
const ok = require("assert").ok
, equal = require("assert").equal
, throws = require("assert").throws
- , createChannel = require("../../lib").createChannel
+ , createChannel = require("../../index").createChannel
var requests = parseInt(process.argv[2])
, ch = null
@@ -1,7 +1,7 @@
const ok = require("assert").ok
, equal = require("assert").equal
- , createChannel = require("../../lib").createChannel
- , spawn = require("../../lib").spawn
+ , createChannel = require("../../index").createChannel
+ , spawn = require("../../index").spawn
, timeout = require("../common").timeout
, shutdown = require("../common").shutdown
@@ -1,7 +1,7 @@
const Buffer = require("buffer").Buffer
, ok = require("assert").ok
, throws = require("assert").throws
- , createChannel = require("../../lib").createChannel
+ , createChannel = require("../../index").createChannel
var sub = null
, messages = parseInt(process.argv[2])
@@ -1,7 +1,7 @@
const Buffer = require("buffer").Buffer
, ok = require("assert").ok
, throws = require("assert").throws
- , createChannel = require("../../lib").createChannel
+ , createChannel = require("../../index").createChannel
var sub = null
, messages = parseInt(process.argv[2])
@@ -1,7 +1,7 @@
const Buffer = require("buffer").Buffer
, equal = require("assert").equal
- , createChannel = require("../../lib").createChannel
- , spawn = require("../../lib").spawn
+ , createChannel = require("../../index").createChannel
+ , spawn = require("../../index").spawn
, timeout = require("../common").timeout
, shutdown = require("../common").shutdown
@@ -1,5 +1,5 @@
const equal = require("assert").equal
- , createChannel = require("../../lib").createChannel
+ , createChannel = require("../../index").createChannel
const NO_MESSAGE = 4
@@ -1,7 +1,7 @@
const Buffer = require("buffer").Buffer
, equal = require("assert").equal
- , createChannel = require("../../lib").createChannel
- , spawn = require("../../lib").spawn
+ , createChannel = require("../../index").createChannel
+ , spawn = require("../../index").spawn
, timeout = require("../common").timeout
, shutdown = require("../common").shutdown
@@ -1,6 +1,6 @@
const Buffer = require("buffer").Buffer
, equal = require("assert").equal
- , createChannel = require("../../lib").createChannel
+ , createChannel = require("../../index").createChannel
const NO_MESSAGE = 2
@@ -1,4 +1,4 @@
-const createChannel = require("../../lib").createChannel
+const createChannel = require("../../index").createChannel
var resp;
@@ -1,4 +1,4 @@
-const createChannel = require("../../lib").createChannel
+const createChannel = require("../../index").createChannel
var resp = null;
@@ -1,5 +1,5 @@
-const createChannel = require("../../lib").createChannel
- , geturi = require("../../lib").geturi
+const createChannel = require("../../index").createChannel
+ , geturi = require("../../index").geturi
const TCP_PORT = require("../common").TCP_PORT
, TCP_HOST = require("../common").TCP_HOST
@@ -1,8 +1,8 @@
const equal = require("assert").equal
, doesNotThrow = require("assert").doesNotThrow
- , createChannel = require("../../lib").createChannel
- , spawn = require("../../lib").spawn
- , geturi = require("../../lib").geturi
+ , createChannel = require("../../index").createChannel
+ , spawn = require("../../index").spawn
+ , geturi = require("../../index").geturi
, timeout = require("../common").timeout
, shutdown = require("../common").shutdown
@@ -1,7 +1,7 @@
const ok = require("assert").ok
, equal = require("assert").equal
- , createChannel = require("../../lib").createChannel
- , spawn = require("../../lib").spawn
+ , createChannel = require("../../index").createChannel
+ , spawn = require("../../index").spawn
, timeout = require("../common").timeout
, shutdown = require("../common").shutdown
@@ -1,4 +1,4 @@
-const createChannel = require("../../lib").createChannel
+const createChannel = require("../../index").createChannel
var resp = createChannel("resp");
resp.connect("proc://worker-pool");
View
@@ -1,8 +1,8 @@
const ok = require("assert").ok
, equal = require("assert").equal
, createServer = require("net").createServer
- , createChannel = require("../../lib").createChannel
- , spawn = require("../../lib").spawn
+ , createChannel = require("../../index").createChannel
+ , spawn = require("../../index").spawn
, timeout = require("../common").timeout
, shutdown = require("../common").shutdown
@@ -1,6 +1,6 @@
const Socket = require("net").Socket
, ok = require("assert").ok
- , createChannel = require("../../lib").createChannel
+ , createChannel = require("../../index").createChannel
var worker = null
@@ -1,8 +1,8 @@
const ok = require("assert").ok
, equal = require("assert").equal
- , createChannel = require("../../lib").createChannel
- , spawn = require("../../lib").spawn
- , send = require("../../lib").send
+ , createChannel = require("../../index").createChannel
+ , spawn = require("../../index").spawn
+ , send = require("../../index").send
, timeout = require("../common").timeout
, shutdown = require("../common").shutdown
@@ -1,6 +1,6 @@
const ok = require("assert").ok
- , createChannel = require("../../lib").createChannel
- , send = require("../../lib").send
+ , createChannel = require("../../index").createChannel
+ , send = require("../../index").send
var requests = parseInt(process.argv[2])
, resp = null
@@ -1,8 +1,8 @@
const equal = require("assert").equal
, throws = require("assert").throws
, Buffer = require("buffer").Buffer
- , createChannel = require("../../lib").createChannel
- , spawn = require("../../lib").spawn
+ , createChannel = require("../../index").createChannel
+ , spawn = require("../../index").spawn
, timeout = require("../common").timeout
, shutdown = require("../common").shutdown
View
@@ -1,7 +1,7 @@
const ok = require("assert").ok
, equal = require("assert").equal
- , createChannel = require("../../lib").createChannel
- , spawn = require("../../lib").spawn
+ , createChannel = require("../../index").createChannel
+ , spawn = require("../../index").spawn
, timeout = require("../common").timeout
, shutdown = require("../common").shutdown
@@ -1,8 +1,8 @@
const Buffer = require("buffer").Buffer
, ok = require("assert").ok
, equal = require("assert").equal
- , createChannel = require("../../lib").createChannel
- , spawn = require("../../lib").spawn
+ , createChannel = require("../../index").createChannel
+ , spawn = require("../../index").spawn
, createPayload = require("../common").createPayload
, timeout = require("../common").timeout
, shutdown = require("../common").shutdown
@@ -1,6 +1,6 @@
const equal = require("assert").equal
-const createChannel = require("../../lib").createChannel
- , send = require("../../lib/").send
+const createChannel = require("../../index").createChannel
+ , send = require("../../index").send
, createPayload = require("../common").createPayload
const MESSAGE_SIZE = parseInt(process.argv[2]);
@@ -1,6 +1,6 @@
const ok = require("assert").ok
, throws = require("assert").throws
- , createChannel = require("../lib/").createChannel
+ , createChannel = require("../index").createChannel
, RespChannel = require("../lib/resp").RespChannel
, ReqChannel = require("../lib/req").ReqChannel
, SubChannel = require("../lib/sub").SubChannel
View
@@ -1,6 +1,6 @@
const equal = require("assert").equal
, ok = require("assert").ok
- , createChannel = require("../lib").createChannel
+ , createChannel = require("../index").createChannel
, timeout = require("./common").timeout
, shutdown = require("./common").shutdown
@@ -2,7 +2,7 @@ const equal = require("assert").equal
, ok = require("assert").ok
, throws = require("assert").throws
, Buffer = require("buffer").Buffer
- , createChannel = require("../lib").createChannel
+ , createChannel = require("../index").createChannel
, timeout = require("./common").timeout
, shutdown = require("./common").shutdown
@@ -1,6 +1,6 @@
const equal = require("assert").equal
- , createChannel = require("../lib").createChannel
- , spawn = require("../lib").spawn
+ , createChannel = require("../index").createChannel
+ , spawn = require("../index").spawn
, openStdMsg = require("../lib/util").openStdMsg
, timeout = require("./common").timeout
, shutdown = require("./common").shutdown
@@ -1,6 +1,6 @@
const equal = require("assert").equal
- , spawn = require("../lib").spawn
- , stdmsg = require("../lib").stdmsg
+ , spawn = require("../index").spawn
+ , stdmsg = require("../index").stdmsg
, timeout = require("./common").timeout
, shutdown = require("./common").shutdown
@@ -1,7 +1,7 @@
const ok = require("assert").ok
, equal = require("assert").equal
, notEqual = require("assert").notEqual
- , spawn = require("../../lib").spawn
+ , spawn = require("../../index").spawn
, timeout = require("../common").timeout
, shutdown = require("../common").shutdown
@@ -1,7 +1,7 @@
const join = require("path").join
, stat = require("fs").stat
, writeFile = require("fs").writeFile
- , spawn = require("../../lib").spawn
+ , spawn = require("../../index").spawn
switch (process.argv[2]) {
View
@@ -1,7 +1,7 @@
const Buffer = require("buffer").Buffer
, equal = require("assert").equal
- , spawn = require("../../lib").spawn
- , createChannel = require("../../lib").createChannel
+ , spawn = require("../../index").spawn
+ , createChannel = require("../../index").createChannel
, timeout = require("../common").timeout
, shutdown = require("../common").shutdown
@@ -1,7 +1,7 @@
const Buffer = require("buffer").Buffer
, print = require("util").print
- , spawn = require("../../lib").spawn
- , createChannel = require("../../lib").createChannel
+ , spawn = require("../../index").spawn
+ , createChannel = require("../../index").createChannel
, equal = require("assert").equal
var testsubject

0 comments on commit 3332cc6

Please sign in to comment.