Skip to content
Browse files

Adjust tests for Travis CI build.

Adjusted `t/sdk/proxy.t.js` for Linux. On Darwin the server process
exits successful, while on Linux the exit is null and the signal is
reported.

Updated the `stdout` listener to fire only once. It was firing twice on
Travis CI, causing the test to setup a second proxy which failed because
the ports were already bound.
  • Loading branch information...
1 parent 76b986c commit db5a1b9a640d4b25b5ea8490ee2e8641cad68b26 @bigeasy committed Mar 6, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 t/sdk/proxy.t.js
View
5 t/sdk/proxy.t.js
@@ -6,7 +6,7 @@ require('./proof')(3, function (step, say, ok, equal, execute, proxy) {
var other = step();
server.on('error', function (error) { throw error });
server.stderr.pipe(process.stderr);
- server.stdout.on('data', function (chunk) {
+ server.stdout.once('data', function (chunk) {
proxy(9293, 9593, 9000, function (buffer) { return buffer });
client = execute('integer/client', [ '127.0.0.1', 9293 ]);
client.stderr.pipe(process.stderr);
@@ -18,7 +18,8 @@ require('./proof')(3, function (step, say, ok, equal, execute, proxy) {
});
});
server.on('close', function (code, signal) {
- equal(code, 0, 'server closed');
+ if (code != null) equal(code, 0, 'server closed');
+ else equal(signal, 'SIGTERM', 'server closed');
callback(null);
});
});

0 comments on commit db5a1b9

Please sign in to comment.
Something went wrong with that request. Please try again.