Browse Source

test: fix timing sensitive tests

v0.11.2-release
Fedor Indutny 12 years ago
parent
commit
0c72936641
  1. 4
      test/simple/test-http-client-timeout-event.js
  2. 2
      test/simple/test-http-upgrade-server.js

4
test/simple/test-http-client-timeout-event.js

@ -54,5 +54,7 @@ server.listen(options.port, options.host, function() {
req.destroy();
assert.equal(timeout_events, 1);
}, 10);
req.end();
setTimeout(function () {
req.end();
}, 5);
});

2
test/simple/test-http-upgrade-server.js

@ -155,7 +155,7 @@ function test_standard_http() {
writeReq(conn, 'GET / HTTP/1.1\r\n\r\n');
});
conn.on('data', function(data) {
conn.once('data', function(data) {
assert.equal('string', typeof data);
assert.equal('HTTP/1.1 200', data.substr(0, 12));
conn.end();

Loading…
Cancel
Save