8000 fixed the multiprocess tests · rboss/log4js-node@22160f9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 22160f9

Browse files
author
Gareth Jones
committed
fixed the multiprocess tests
1 parent 73437ec commit 22160f9

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

test/multiprocess-test.js

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,24 @@ function makeFakeNet() {
3030
};
3131
},
3232
createServer: function(cb) {
33-
var fakeNet = this;
34-
cb({
35-
remoteAddress: '1.2.3.4',
36-
remotePort: '1234',
37-
setEncoding: function(encoding) {
38-
fakeNet.encoding = encoding;
39-
},
40-
on: function(event, cb) {
41-
fakeNet.cbs[event] = cb;
42-
}
43-
});
33+
var fakeNet = this;
34+
cb({
35+
remoteAddress: '1.2.3.4',
36+
remotePort: '1234',
37+
setEncoding: function(encoding) {
38+
fakeNet.encoding = encoding;
39+
},
40+
on: function(event, cb) {
41+
fakeNet.cbs[event] = cb;
42+
}
43+
});
4444

45-
return {
46-
listen: function(port, host) {
47-
fakeNet.port = port;
48-
fakeNet.host = host;
49-
}
50-
};
45+
return {
46+
listen: function(port, host) {
47+
fakeNet.port = port;
48+
fakeNet.host = host;
49+
}
50+
};
5151
}
5252
};
5353
}
@@ -183,7 +183,6 @@ vows.describe('Multiprocess Appender').addBatch({
183183
topic: function(net) {
184184
var logString = JSON.stringify({ level: { level: 10000, levelStr: 'DEBUG' }, data: ['some debug']}) + '__LOG4JS__';
185185

186-
net.cbs['connect']();
187186
net.cbs['data'](JSON.stringify({ level: { level: 40000, levelStr: 'ERROR' }, data: ['an error message'] }) + '__LOG4JS__');
188187
net.cbs['data'](logString.substring(0, 10));
189188
net.cbs['data'](logString.substring(10));

0 commit comments

Comments
 (0)
0